hacking on R's sqrt()