It depends on what you mean by fast . Double sqrt isn ' t particularly fast . If you desperately need speed , you might want to stay in the integer domain entirely . See w a y t ogettheintegerpartofsqrtn . EDIT it also depends on your hardware . On some hardware , double sqrt might be perfectly fast . On some other hardware , singleprecision float might be your best bet if if fully covers your expected range of inputs . On others , pure integer computations might be the best . If I were doing this , I ' d probably write it with plain ol ' double sqrt and stdround as a first cut , and then I ' d profile my code later , once it worked ! to see if the sqrt was a bottleneck . <| sep |> Yeah , because all iPhone users are brain dead andor idiots who always opt for the shiny ones . Or maybe you ' re just an irrational ass who cares way too much about something as trivial as phone OS