Re: Why Mathematica does not issue a warning when the calculations

*To*: mathgroup at smc.vnet.net*Subject*: [mg117620] Re: Why Mathematica does not issue a warning when the calculations*From*: Richard Fateman <fateman at eecs.berkeley.edu>*Date*: Thu, 24 Mar 2011 06:32:09 -0500 (EST)

Perhaps Table[FractionalPart[(6 + Sqrt[SetPrecision[2, n]])^20], {n, 15, 25}] // Column is a better illustration of the software-precision inheritance capability of Mathematica. It is like running the same computation but with numbers 2.000000 2.0000000 2.00000000 etc, and seeing what happens. the fact that 2.0000==2.000000000 is True (etc) means that a==b and both a and b are numbers, does not mean that f[a]==f[b]. I view this as problematical, even if most people don't ever even notice it. DL says... > Mathematica documentation is fairly clear about distinctions between > machine vs. (Mathematica's implementation of) software arithmetic. The > claims to which you refer are made for the latter and not the former. > While I've not looked too hard of late, I think this is made > reasonably clear in the Documentation Center. the loop above does not involve machine numbers, but it does suggest a failure to increase precision automatically in the context of FractionalPart. > Not that many languages support high precision arithmetic. Amongst the > ones that do, Mathematica seems to be holding its own in terms of use. The wikipedia article on arbitrary-precision arithmetic lists 37 libraries or packages that are associated with virtually every programming language (even PHP) in current use. Of these, about 22 support arbitrary precision floats. Figuring out how many people use these libraries is impossible, since most are free to download, and for many of them I suspect no one is keeping track. There is also list of some 14 languages that have arbitrary precision built in or in their standard library. Similarly, even if WRI knows how many licensed copies of Mathematica are deployed, I suspect that no one can keep track of who actually is using the high-precision arithmetic. For example, all those people who are using Mathematica for plotting or drawing or freshman calculus are probably using machine floats, or maybe even exact rationals and integers. That's just for arbitrary precision... how many libraries etc are there to do what Mathematica does, namely significance arithmetic? I could find none in wikipedia. There are libraries to do interval arithmetic, however, and maybe we should count them. The wikipedia article on interval arithmetic gives some pointers to them. (I'm not citing wikipedia as an authority, just as a rough approximation to the literature.) From a marketing perspective, it may be quite unimportant how Mathematica does bigfloats, or how it does intervals. If you did not have significance arithmetic, what then could you do if you wanted to have some reliable error estimates. You could use intervals instead of numbers. But you would have to tinker somewhat with any non-trivial program to get it to work with intervals. Or... .... Here's a heuristic to see if your answer is numerically correct. Do the computation in precision 20. Do the computation in precision 40. If the answers agree to (say) 18 places, believe it. You could even do the computation in precision 80, and see if that agrees with the precision 40 result to (say) 38 places. This is not entirely foolproof. But it may be a good deal faster than doing it one precision (say 40) in significance arithmetic, at least if you are using state-of-the-art arbitrary precision in the first place. ... > Not very many. One such person carries considerable weight in his > field (which is very much the appropriate term, as it happensy). But > his field is something quite removed from computer arithmetic. (I think you mean "quite removed from computer algebra"? At least if we are thinking of the same heavyweight. And that still would not be very accurate.) RJF

**Re: Problem with DateListPlot Aspect Ratio**

**Re: Why Mathematica does not issue a warning when the calculations**

**Re: Why Mathematica does not issue a warning when the calculations**

**Re: Why Mathematica does not issue a warning when the calculations**