You could try
min = 0;
max = 1;
value = 3.5;
x = (value % max) + min
But i'm not %100 on this. I tried this a few times with different result. Higher than max seems to have no troubles.
I have to admit. If this works it would seem that a cycle function would be kind of a silly idea; since this is a pretty minimal expression. We don't really use function such a multiply(var1, var2). Unless of course there is some serious optimization.