mirror of
https://github.com/nanoy42/coope
synced 2024-12-25 08:23:46 +00:00
7 lines
206 B
Python
7 lines
206 B
Python
import math
|
|
|
|
def compute_price(price, a, b, c, alpha):
|
|
if price < alpha:
|
|
return float(price) * (1 + float(a) + float(b) * math.exp(-c/(price-alpha)**2))
|
|
else:
|
|
return price * (1 + a)
|