So i have two raster (raster A and B) that represent maximum and minimum value of a parameter. I have another raster that reprensent the value that i want to use to calculate the values between the min-max range using this equation:

(?function?)*(-exp(rasterC))

The problem is that the result sometimes is not between the range in some cells. What kind of statistical function can I use for ?function? to remain between min-max range?

I used (Max-min/mean) for ?function?... but is not the correct function.

raster_a = min raster

raster_b = max raster

raster_c = 0 -> 1 raster

A linear mapping of C (0->1) on to the linear range of (B->A) is