mirror of
https://github.com/nanoy42/coope
synced 2024-09-20 21:24:07 +00:00
7 lines
171 B
Python
7 lines
171 B
Python
import math
|
|
|
|
def compute_price(price, a, b, c, alpha):
|
|
if price < a:
|
|
return price * (a + b * math.exp(-c/(price-alpha)**2))
|
|
else:
|
|
return price * a
|