25 Mar
2001
25 Mar
'01
6:15 a.m.
On Sat, 24 Mar 2001, f.couperin wrote:
Russ Whitaker <russ@ashlandhome.net> wrote :
The problem is "A <> B": adding two lines to program writeln('A= ', A); writeln('B= ', B); and I got:
A= 1.030000000000000e+02 B= 1.030000000000000e+02 Failed
You'll see the difference with : Writeln('A = ',A:32); Writeln('B = ',B:32); or with Writeln('A - B = ',A-B);
You can also get "OK" in the original program by inserting the line B := round(B); It all gets back to representing non-integers in binary format. Some non-integers require an infinate number of bits to get an *exact* representation. For example, 1.3 is equivalent to the series 1 + 1/4 + 1/32 + ... or 1.01001 ... Russ