Expected behaviour of function integers applied to real arguments?
Once upon a time, when a whiteboard was bitten by a radioactive spider and mutated into Mathcad, I wrote several sequence generation functions.
One of these functions was integers(a,b), which, given integers a and b, generated a list of consecutive integers between a and b, inclusive.
Whilst updating my library of such functions to Mathcad Prime 11, I was emboldened by the idea of handling real a and b. Now, I could have gone the restrictive route and treated non-integer arguments as errors, but I decided to go with the flow and see if I could give some meaning to real inputs.
All went swimmingly in my imagination - just restrict the output of the function to those integers lying between a and b. Until I thought about it for a few moments and realised that wouldn't work for certain cases - see the bottom of the screenshot below.

Any ideas for how integers should handle such cases to give "meaningful" results? Or am I on a fool's errand?
(The algorithm doesn't matter, merely the behaviour)
Oh, and, yes, integers covers the Gaussian integers. The image below shows the performance change from using a Bresenham algorithm (integers) to using vec (integers2) to generate a sequence.

Stuart
And talking of flying ideas about, it's a wonderfully breezy day where I live. The wind is about 18 knots, gusting to 30 knots (that's about Beaufort 5 and 6, respectively). There is a yacht sailing just off the shore of the island a few miles away from me, the corvids are enjoying themselves, and gliders are having fun taking advantage of the lift (ridge and wave, I'd imagine) a bit further north in the Scottish Highlands. And here am I cogitating numerical niceties on land. Sigh.

