Re: FindRoot cannot find obvious solution

*To*: mathgroup at smc.vnet.net*Subject*: [mg48186] Re: FindRoot cannot find obvious solution*From*: ab_def at prontomail.com (Maxim)*Date*: Mon, 17 May 2004 03:21:55 -0400 (EDT)*References*: <200404270847.EAA18892@smc.vnet.net> <c6o3lc$cd0$1@smc.vnet.net> <c6qags$s56$1@smc.vnet.net> <200405080524.BAA11690@smc.vnet.net> <c7klcs$2kn$1@smc.vnet.net> <200405110920.FAA28320@smc.vnet.net> <c7uspa$q7s$1@smc.vnet.net> <200405140412.AAA04779@smc.vnet.net> <c83qlt$li3$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Andrzej Kozlowski <akoz at mimuw.edu.pl> wrote in message news:<c83qlt$li3$1 at smc.vnet.net>... > On 14 May 2004, at 13:12, Maxim wrote: > > > In other words, using true interval arithmetic with low precision > > numbers is safe? But that was exactly what I did in the examples with > > Interval: > > > > IntervalMemberQ[Interval[1`2],0] > > IntervalMemberQ[Sin[Interval[1`2]],0] > > > > How does your explanation clarify this inconsistency? > > > You are not actually using "Interval arithmetic" here. At best,you are > using a mixture of Interval arithmetic and significance arithmetic. You > can certainly make accurate error estimates using interval arithmetic > with exact numbers. > > > IntervalMemberQ[Interval[{1-1/100,1+1/100}],0] > False > and so on. > > I have already answered the other question in another posting. This > happens because Sin increases Precision (and by the way, it's not yet > another "paradox"). No inconsistency. > But nobody says that Interval[Sin[1`2]] and Sin[Interval[1`2]] should be identical; it's no surprise that Sin[Interval[{0,Pi}]] is not Interval[{Sin[0],Sin[Pi]}]. Here's what the question was about (it seems that I have to start with that). We create Interval[1`2]; numbers -0.29 and 2.2 belong to the interval, therefore taking Sin of the interval we must obtain an interval which includes at least the range from -0.28 to 1.0; otherwise it would be like squaring Interval[{0,2}] and still getting Interval[{0,2}] as the answer. Instead, Sin[Interval[1`2]] returns an interval which includes (by IntervalMemberQ) only numbers from 0.12 to 1.0. It's quite plausible that, while the interval bounds are rounded outwards as they should be, the increased precision 'eats up' this rounding and in the end we get an interval which is narrower than necessary. But to say that there is no inconsistency in the strict mathematical sense is incorrect. > > As to Equal, > > let's count digits: > > > > In[1]:= > > RealDigits[1`2, 2, 8, 1] > > RealDigits[1`2, 2, 9, 1] > > > > Out[1]= > > {{0,1,0,0,0,0,0,0},2} > > > > Out[2]= > > {{0,1,0,0,0,0,0,0,0},2} > > > > There's some uncertainty as to how many digits to take: by default > > RealDigits returns 7 digits, but we can ask it to give us 8 digits; > > all the next ones will be Indeterminate. I added leading zero just for > > alignment with RealDigits[2.2,2] and RealDigits[2.3,2], which give > > > > In[3]:= > > RealDigits[2.2,2] > > RealDigits[2.3,2] > > > > Out[3]= > > {{1,0,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0 > > ,0,1, > > 1,0,0,1,1,0,0,1,1,0,0,1,1,0,1,0},2} > > > > Out[4]= > > {{1,0,0,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1 > > ,1,0, > > 0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0},2} > > > > If the eight-digits rule applies here, 1`2 is either equal to anything > > (eight digits is all we know) or unequal both to 2.2 and 2.3 by the > > leading digit. Perhaps some more 'careful reading of documentation' is > > required? > > > > Maxim Rytin > > m.r at prontomail.com > > > As I wrote in my other posting, the actual rule is probably based on > Precision and not exactly the number of digits, which only roughly > corresponds to it. The exact rule for identifying "close" approximate > numbers is not given because nobody needs it. > In any case, as I wrote before, significance arithmetic does not work > well with low precision numbers and that is the price one pays for it > being manageable fast. If you need error estimates for low precision > computations use(exact!) interval arithmetic. We've been through that before: if equality is determined by the precision of the number (that would be explanation #4 or so by now?), then only numbers in the range from 1-0.01 to 1+0.01 should be considered as equal to 1`2. Maxim Rytin m.r at prontomail.com

**Follow-Ups**:**Re: Re: FindRoot cannot find obvious solution***From:*Andrzej Kozlowski <akoz@mimuw.edu.pl>

**References**:**Re: FindRoot cannot find obvious solution***From:*ab_def@prontomail.com (Maxim)

**Re: FindRoot cannot find obvious solution***From:*ab_def@prontomail.com (Maxim)

**Re: FindRoot cannot find obvious solution***From:*ab_def@prontomail.com (Maxim)

**Re: Re: Uniform design**

**any idea how to solve linear system with complex number**

**Re: Re: Re: FindRoot cannot find obvious solution**

**Re: Re: FindRoot cannot find obvious solution**