Re: String representations of numbers and approximate equality

2014-09-25 Thread Chris Angelico
On Thu, Sep 25, 2014 at 10:40 PM, Dave Angel wrote: > Another approach is to see if twiddling the last digit gets you > from too high to too low. I used this approach to check a trig > package I wrote in '75. An answer was close enough if twiddling > the last digit changed the result value from

Re: String representations of numbers and approximate equality

2014-09-25 Thread Dave Angel
Chris Angelico Wrote in message: > On Thu, Sep 25, 2014 at 5:56 AM, Dave Angel wrote: >> Your definition is not nearly as concrete as you think. Is the >> first number considered to be exact, and we'll only check the >> second? Will the factor always be an int, and thus >> exact? > > Apologie

Re: String representations of numbers and approximate equality

2014-09-24 Thread Chris Angelico
On Thu, Sep 25, 2014 at 5:56 AM, Dave Angel wrote: > Your definition is not nearly as concrete as you think. Is the > first number considered to be exact, and we'll only check the > second? Will the factor always be an int, and thus > exact? Apologies: the definition is concrete, just under-sp

Re: String representations of numbers and approximate equality

2014-09-24 Thread Dan Stromberg
On Wed, Sep 24, 2014 at 9:54 AM, Chris Angelico wrote: > Yes, it's another "how can I see if two numbers are approximately > equal" thread, but this time I have a concrete definition of > "approximately equal"... and they're Decimals, not floats. > > I have a number of files (this is an ongoing th

String representations of numbers and approximate equality

2014-09-24 Thread Chris Angelico
Yes, it's another "how can I see if two numbers are approximately equal" thread, but this time I have a concrete definition of "approximately equal"... and they're Decimals, not floats. I have a number of files (this is an ongoing thing) in which there are two columns of numbers. One of them shoul