# New Ticket Created by  Simon Glover 
# Please include the string:  [perl #27690]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=27690 >



 This code:

        new P0, .PerlNum
        set P0, -1.2
        new P1, .PerlString
        set P1, "-1.2"
        eq_num P0, P1, OK
        print "not "
OK:     print "ok\n"
        end

 prints "not ok", when it should print "ok". A similar problem exists with
 the ne_num op, suggesting the underlying bug is somewhere in the
 implementation of the cmp_num vtable function.

 [And yes, I'm well aware of the problems inherent in doing floating point
  comparisons. However, in this case, the floating-point respresentation
  of the string '1.2' should be exactly the same as the representation of
  the number 1.2, since the former is converted into the latter
  internally]

 Simon

Reply via email to