refactor fvar test for cos
refactor fvar test for cos

stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/stan,stan-dev/math,stan-dev/math,stan-dev/stan,stan-dev/stan,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/stan,stan-dev/math,stan-dev/stan