You only can store or return a value from a function which MySQL have datatypes.
In short if you want to store a result set to variable you have to have a table datatype, unfortunately MySQL doesn't have such.
Solution: What you can do is, you can create temporary tables with respective columns for each result set to store(or may be in the same temp table in your case).
Do all operations on the temp table and store the result to a variable(FLOAT in you case), return the variable.
Let me know if that helps :)
-Thanks