Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: YpjY
  • Order by date
  1. YpjY

    Comparison of floats (if a>b then), float precision

    Great! Thank you very much, I overlooked those links you gave in your first post.. Though, try running your code with A ending in '20' instead of '11'. I get exactly the same output as before (i.e., both the regular and the scientific representation of A and B are equal), YET the result is A...
  2. YpjY

    Comparison of floats (if a>b then), float precision

    Thanks for your answers. I have just verified that the result of IsAGreaterThanB(98765432109876543211.0, 98765432109876543210.0) is False! Not True, as I suspected above without having it verified.. So it seems that "a > b" and "IsAGreaterThanB(a, b)" give always the same result. Or has anyone...
  3. YpjY

    Comparison of floats (if a>b then), float precision

    Hi, could someone explain clearly what exactly Delphi does when I write "if a > b then", given that "var a, b: Extended"? By trial and error I have found that it only checks the first 19 non-zero digits, e.g. 0.000...00001 > 0.0 is True for any number of zeros 98765432109876543220.0 >...

Part and Inventory Search

Back
Top