RosettaCodeData/Task/Map-range/Maxima/map-range.maxima

5 lines
123 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
maprange(a, b, c, d) := buildq([e: ratsimp(('x - a)*(d - c)/(b - a) + c)],
lambda([x], e))$
f: maprange(0, 10, -1, 0);