math: add fenv test and new 'add' function in gen