News for hackers. Stuff that matters.
Re:Pokémon Go Is Teaching Americans the Metric System by Someone on Saturday July 23, 2016 @02:34PM (#12150488)
Because it gets messy very soon. To start with, you would have to pick a set of distributions that is closed under the set of operations you want to perform.

If you pick 'all normal distributions' as your set, that means that you can only allow addition, subtraction, and multiplication by a constant (= a normal distribution with zero variance); you won't be able to compute x^2, take a square root, compute |x|, etc. That rules out, for example, computing the variance of a set of inexactly known numbers.

To make matters worse, to do this really well, you have to track where values come from. You really want:

  x = 6±3.5m
  z = x - x
to have z equal to 0±0m, but

  x = 6±3.5m
  y = 6±3.5m
  z = x - y
to have z equal to 0±4.9m. Similarly, x+x should be 12±7m, and x+y should be 12±4.9m

The best you probably can do is to forget about the second issue, and do interval arithmetic. That is useful, but gives you extremely pessimistic results.

Edit: a good solution also would resolve the question of how to handle conditionals. if x > 0 could pick each of its branches according to the probability that x is larger than zero, or even execute both branches partially (whatever that would mean), according to the distribution of x.

Re:Pokémon Go Is Teaching Americans the Metric System by simcop2387 on Saturday July 23, 2016 @08:54PM (#12151707)
Why would x+y be 12+-4.9m? shouldn't it be the same +-7m?
Re:Pokémon Go Is Teaching Americans the Metric System by nialo on Saturday July 23, 2016 @09:26PM (#12151787)
The parent is taking the error numbers as something like 1 standard deviation on a normal distribution, rather than an absolute limit. so, x = 6±3.5m means something like "x is equal to 6 + a random number taken from a normal distribution with standard deviation 3.5 centered around 0" and y is the same, but with a _different_ random number.

(I'm a little hazy on exactly what distribution is being assumed, but the basic idea of x and y being different random numbers is the important thing)

In principle one could also interpret x = 6±3.5m as "x is equal to 6 + a random number taken uniformly from the rand -3.5 to 3.5" or something, and then x+y would be 12+-7, but the real world numbers this is nominally supposed to represent don't really work that way. I think this is what is mean by "The best you probably can do is to forget about the second issue, and do interval arithmetic. That is useful, but gives you extremely pessimistic results."

Re:Pokémon Go Is Teaching Americans the Metric System by simcop2387 on Sunday July 24, 2016 @04:25PM (#12154694)
Yea interval arithmatic is what i thought was being talked about before. It's one of the things that lead me to seeing all kinds of issues trying to move forward with the language i made/mentioned in another comment. I decided that I needed to lift how I was handling numerics into multiple types: floats, rationals, intervals, etc. and design the whole thing so that you could have more than one kind of interval (i hadn't thought about doing it the way you describe), like open and closed around the upper and lower limits.