Add squareRoot function, fixes #792

As requested by @amangup. I haven't tested the spec yet so I'd appreciate feedback from @esc.