updated fma function to use std::fma for operation