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

5 lines
123 B
Text
Raw Permalink Normal View History

2013-04-10 21:29:02 -07: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);