Implement fma and mad

I've implemented fma(x,y,z) and mad(x,y,z), as a follow-up to #6330. I'd be happy to receive comments.

Probably better to use the llvm intrinsic here.