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


$ perl -Ilib t/pmc/perlnum.t
...
not ok 36 - +- zero
#     Failed test (t/pmc/perlnum.t at line 690)
#          got: '0
# 0
# '
#     expected: '0
# -0.000000
# '

The code being:

output_is(<<'CODE', <<'OUTPUT', "+- zero");
  new P0, .PerlNum
  set P0, 0.0
  print P0
  print "\n"
  set P0, -0.0
  print P0
  print "\n"
  end
CODE
0
-0.000000
OUTPUT

I don't think there is any guarantee how fp -0.0 should be printed
by printf() (I could be wrong on this, as usual). Even if there is,
unless Parrot does something about it (to fudge the result), I do not
think a platform behaving slightly differently (like printing the
negative zero as zero) is not a failure.  How and why this happens
could depend on a number of things: which fp mode was chosen when
compiling, when executing, and so on.

-- 
Jarkko Hietaniemi <[EMAIL PROTECTED]> http://www.iki.fi/jhi/ "There is this special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen

Reply via email to