Advertisement
awsmpshk

Lipshic

Dec 11th, 2021
836
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data Copied
Advertisement