61
Flat Earth Theory / Re: Are plane tickets real?
« on: April 10, 2020, 05:09:51 PM »
- With the "TypeScript" tab selected and highlighted in green, delete the existing script code and paste in the code I've given you.
You have given me no code.I encourage you to try this for yourself and examine the code.
I can't. You have not given me any code.
If you are logged in, you should see this at the top of my post (to be clear, my previous post, not this one):
That paperclip icon is supposed to indicate that there is an attachment to the message. Then at the bottom of my message, you should see..
And if you click on the "Haversine.txt" it should allow you to download the attachment. It's a simple text file containing the code. If you still can't see it, say so and I'll just post the code into the message, it's not that long.
Obviously since the locations are randomly generated, each time you run, you should expect to get slightly different results, but the overall picture is the same, no more than a 5mm discrepancy between distance of up to 20,000km. There is no doubt. Bing uses Haversine.
Are you serious?
It's like saying this online hypotenuse calculator uses the Pythagorean Theorem. If you plug in A and B then the C only has one answer. One very precise answer. Only one. If you plug in a hundred billion sets of data into this calculator they will match the EXACT distance down to the one spetillionth of a nanometer 100% of the time. Regardless of the distance.
All real numbers (as opposed to whole number integers) in computers are inexact because these numbers are stored in memory locations of a fixed number of bits, so if you have an inexact number such as √2 you can only hold a finite number of digits. Numbers like √2 and pi are irrational and the number of digits stretch out to infinity. No computer can hold an infinite number of digits. If you think about it, you've probably heard in the news from time to time that someone has broken the previous record for calculating the most digits of pi. It's taken them a lot of time on a supercomputer to do this, so no, your average home computer doesn't have an exact value for pi or √2.
The more you manipulate these numbers, the more the errors accumulate.
You can see this in either a real or an online calculator. Start with 2 and keep taking the square root again and again, say 20 times. Then apply x2 20 times and see if you get back to 2. If calculations were exact, you absolutely would, you could do it thousands of times and you'd still get 2. But they aren't exact.
The implementations of Haversine in Bing and the independent one I'm comparing it with are not going to be line for line identical, they have been written by different people, so it is inevitable that they will both accumulate errors, but not identical errors, hence the results won't match 100%. Personally if two people measured a line of 20,000km and they came up with answers 5mm apart I would be pretty impressed.
And just to take your example of the hypotenuse calculator, what exactly is C going to be if A=1 and B=1? Actually I'll let you off if you give me the first 100 million digits of the answer. According to WikiPedia the current best answer to this question is from a guy called Ron Watkins who has worked it out to 10 trillion digits, so I'm really letting you off lightly you know.