TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Classic View

Use Proportional Font
Show HTML Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Wed, 12 Feb 1997 11:43:40 -0500
text/plain (16 lines)
In <[log in to unmask]  Lamar Harris says:
>Path 1 Length (ABCDEA) = 2.5870557464745700000000000
>Path 2 Length (CBAEDC) = 2.5870557464745700000000000
>Path 1 is longer than Path 2
>
>Note that the actual values for the path lengths are the same, but the
>comparison fails.
  It is not at all clear that the actual values are the same.
Perhaps Path 2 is 2.58705574647456999999999999
and     Path 1 is 2.5870557464745700000000000
And of course you can get similar effects in binary with '0.10000' being
greater than, but very close to '0.01111'.
  You really need to look at the bit patterns, like the computer does,
to see what's happening.  Try an unchecked conversion to a matching size
integer representation and then print that in hex.

ATOM RSS1 RSS2