<div dir="ltr">some people were saying expr does internal double precision calculation, is it true? i dont think so...</div><div class="gmail_extra"><br><div class="gmail_quote">2015-06-07 3:10 GMT-03:00 Cyrille Henry <span dir="ltr"><<a href="mailto:ch@chnry.net" target="_blank">ch@chnry.net</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
Le 07/06/2015 04:48, Max a écrit :<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
Merci Cyrille,<br>
<br>
in the formula the intermediate steps are quite small fractions and it<br>
seems their precision is important.<br>
In the test case the Pd implementation is 8917.74 km off the proper<br>
result (2887.26). However I need a precision of about 1m.<br>
</blockquote></span>
i don't know how you get the 2887.26 km proper result : it's not the value computed by the website you send (using value in the patch).<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
So I assume the haversine formula is not implementable in Pd at all?<br>
(unless double precision will be there that is)<br>
<br>
Or is there a workaround?<br>
</blockquote>
<br></span>
i'll thing about it.<br>
cheers<div class="HOEnZb"><div class="h5"><br>
c<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
m.<br>
<br>
<br>
On 2015년 06월 07일 05:05, Cyrille Henry wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
hello,<br>
<br>
pow 2 did not like negative number. use "t f f" and "*" in order to<br>
compute the square of a number.<br>
<br>
i correct 2 of your formula according to what i found in your<br>
link. they both gives the same result : 11805 the same value<br>
computed with your 2nd link gives 12210. for other value, it also<br>
look close. so i guess the difference is number precision.<br>
<br>
<br>
cheers c<br>
<br>
<br>
<br>
Le 06/06/2015 20:18, Max a écrit :<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I tried to implement the Haversine formula in Pd which should<br>
give you the distance in km between two lat long coordinates.<br>
<br>
<a href="https://en.wikipedia.org/wiki/Haversine_formula" target="_blank">https://en.wikipedia.org/wiki/Haversine_formula</a><br>
<a href="http://www.movable-type.co.uk/scripts/latlong.html" target="_blank">http://www.movable-type.co.uk/scripts/latlong.html</a><br>
<br>
One huge obstacle is the imprecision of the 32bit floats, but<br>
even without that I can't get the formula to work. I kept 3<br>
failed implementations in the test-case.<br>
<br>
<a href="http://rosettacode.org/wiki/Haversine_formula" target="_blank">http://rosettacode.org/wiki/Haversine_formula</a><br>
<br>
Could someone give me a hand please?<br>
<br>
<br>
<br>
_______________________________________________<br>
<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list UNSUBSCRIBE and<br>
account-management -><br>
<a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br>
</blockquote>
<br>
<br>
_______________________________________________<br>
<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list UNSUBSCRIBE and<br>
account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br>
</blockquote>
<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1<br>
<br>
iEYEARECAAYFAlVzsO0ACgkQ3EB7kzgMM6KETQCfRvgOmpqbmyhZaH2Y5hzsRHlC<br>
XOgAnR+6lqxJfjTj5k7vR747UU8ATrqA<br>
=pBZv<br>
-----END PGP SIGNATURE-----<br>
<br>
_______________________________________________<br>
<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br>
</blockquote>
<br>
_______________________________________________<br>
<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
</div></div></blockquote></div><br></div>