Solved by ptrblck in post #6 
              
              
                The usage of the amp utilities look alright. 
Based on the code it seems that you explicitly want to use the float data type in some operations, so you could also use nested autocast statements and disable the casting for these operations.