Why such a complicated test.
I'd believe testing that
`cse([cos(x0 + y), x0 + w, x0 + y])`
round trips is enough and clearer. IMHO.