[math] add parenthesis to RMAT macros