Other times I had some linear algebra stuff I was working on, so I learned a bit of Octave[3] to generate test cases with a (hopefully) correct implementation.
I'm still looking for opportunities to try Z3[4] though... (e.g. http://phrack.org/issues/69/4.html#article see "How I Cheat at Maths - Z3 101").
1: https://lamport.azurewebsites.net/tla/tla.html