I do not believe REST implementation works on functions. Try converting that to a procedure, and use that function inside the procedure like
CREATE VIRTUAL PROCUDURE celsiusToFahrenheit(IN p1 long) returns long AS
return select ctof(p1);
We could add support as calling a function vs. calling a procedure with a return parameter really isn't any different.