hello,
pow 2 did not like negative number. use "t f f" and "*" in order to compute the square of a number.
i correct 2 of your formula according to what i found in your link. they both gives the same result : 11805 the same value computed with your 2nd link gives 12210. for other value, it also look close. so i guess the difference is number precision.
cheers c
Le 06/06/2015 20:18, Max a écrit :
I tried to implement the Haversine formula in Pd which should give you the distance in km between two lat long coordinates.
https://en.wikipedia.org/wiki/Haversine_formula http://www.movable-type.co.uk/scripts/latlong.html
One huge obstacle is the imprecision of the 32bit floats, but even without that I can't get the formula to work. I kept 3 failed implementations in the test-case.
http://rosettacode.org/wiki/Haversine_formula
Could someone give me a hand please?
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list