Your function must accept three numbers in any order:
- A signed real number (or
±Infinity) - The number (N) for which you have to generate a number from the range - A signed integer - Minimum of the range
- A signed integer - Maximum of the range
Input:
- The minimum of the range will always be less than the maximum of the range, so don't worry about it
Ncan be any real (if it is possibleInfinityand-Infinityalso can be passed)
Requirements:
- Your function must output same result each time for same inputs
- Your function must output different result each time for different
N(except when it's due to a floating point error) - The output must be in the given range
- The outputs of your function for all numbers
Nmust cover the entire range (except when missing outputs are due to floating point error)
Please specify:
- The order of the input
- Is it possible to pass
±Infinityas aN? - Are the minimum and maximum of the range inclusive or exclusive?
Unable to provide test cases because there are many ways to solve this problem, so please provide your test cases.
The shortest code in each programming language wins!

±Infinityare valid inputs, or is it dependent on whether the language allows them? \$\endgroup\$Nmust cover the entire range (except when missing outputs are due to floating point error).” \$\endgroup\$