Advertisement
awsmpshk

Lipshic

Dec 11th, 2021
982
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. def lipshic_const(rng, eps):
  2.     left = rng[0]
  3.     right = rng[1]
  4.  
  5.     l = 0
  6.  
  7.     i = left + eps
  8.     while i <= right:
  9.         result = abs(f(i + eps) - f(i)) / eps
  10.         if result > left:
  11.             l = result
  12.        
  13.         i += eps
  14.    
  15.     return l
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement