I probably would have used the SELECT from SYSDUMMY1 too, though I like the idea of SET -- simpler.

You could extend either method to gain access to other scalar functions, like the trig functions and logarithms. Not that this would be better than using MI built-ins or C libraries, just another way to do it.