Add basic spec for calculator, fix getop bug.

I'd missed handling of floating point numbers when copying the code from the
book.