Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by Clyde Schechter View Post
    I think Carlo's advice is quite correct: you will not be able to force a == b. What I can add is that, as Carlo has already pointed out, you are demanding exact equality on floating-point calculation results, which is simply impossible. But you can verify close to equality. Instead of -gen c = a == b-, how about -gen c = float(a) == float(b)-? This will tell you if the variables agree to within floating point precision, which is going to be good enough for nearly all practical purposes anyway.
    gen c = float(a) == float(b)
    This is exactly what I want. Thanks so much, Clyde.

    Comment

    Working...
    X