fare(base, demand, supply) applying a surge multiplier of demand / supply clamped between 1.0 and 3.0 (never discount, never gouge past 3×), rounding the final fare to the nearest integer rupee. A supply of zero maxes the surge at 3.0.fare(100, 150, 100)
150
Surge 1.5× applies.
fare(100, 50, 100)
100
Low demand still pays base fare — clamped at 1.0.
min(3.0, max(1.0, ratio)).
Guard the division first.