mstksg / uncertain

Manipulating numbers with inherent measurement/experimental uncertainty.
https://hackage.haskell.org/package/uncertain
BSD 3-Clause "New" or "Revised" License
25 stars 2 forks source link

Data.Uncertain.Uncert ** is different than ^ #2

Closed aavogt closed 7 years ago

aavogt commented 8 years ago
Data.Uncertain> (2+/-2)**10
50000.0 +/- 10000.0
Data.Uncertain> (2+/-2)^10
1000.0 +/- 3000.0

This is the same difference-in-which-occurrences are independent as the 2*x /= x+x example.

mstksg commented 8 years ago

Yeah, this is referenced in #1 I believe. I used to have this explicit example in the documentations but I forgot to put it back in during the v0.2 rewrite.

It's rather unfortunate, but I'm not sure what else to do about this for Uncert itself. The behavior works as expected for the Correlated module...I guess, like the 2*x example, this is just something that you have to watch out for when using the instance? :/