I have an SQLite database, which does not support trig functions. I would like to sort a set of lat,lng pairs in my table by distance as compared to a second lat,lng pair. I'm familiar with the standard haversine distance formula for sorting lat,lng pairs by distance. 

In this case I don't care particularly for precision, my points are separated by large distances, so I don't mind rounding off the distances by treating curves as straight lines.

My question, is there a generally accepted formula for this kind of query? Remember no trig functions!
['https://Stackoverflow.com/questions/6548940', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/475329/']
You could always truncate the [Taylor series expansion](http://en.wikipedia.org/wiki/Cosine#Series_definitions) of sine and use the fact that sin^2(x)+cos^2(x)=1 to get the approximation of cosine. The only tricky part would be [using Taylor's theorem to estimate the number of terms that you'd need for a given amount of precision](http://en.wikipedia.org/wiki/Taylor%27s_theorem#Explicit_formulae_for_the_remainder).
Change "\*" with "/" works for me:

select \*
from Points
order by (lat - @lat) \* (lat - @lat) + ((lng - @lng) / 2) \* ((lng - @lng) / 2)