HTTP/1.1 -1 Read error in cache disk data: SuccessContent-Type: text/tab-separated-values; charset="utf-8" Last-Modified: Sat, 22 Jan 2022 01:27:21 GMT Content-length: 2245 Connection: Close Proxy-Connection: Close X-Cache: HIT from web1.osuosl.org Server: ProxyTrack 0.5 (HTTrack 3.49.2) id summary reporter owner description type status priority milestone component version severity resolution keywords cc lang patch platform 313 ignore print -0 test errors on win32 rurban "The win32 msvcrt has a special limitation not to print -0 as -0, instead it prints 0. openbsd seems to have the same problem. cygwin is not affected, since it uses newlib, which is similar to the glibc in this regard. For now I fixed the failing tests, but there should be a workaround. {{{ t\pmc\complex.t: not ok 380 - sinh of 0-2i # Have: 0.000000-0.909297i # Want: -0.000000-0.909297i not ok 381 - sinh of 0+2i # Have: 0.000000+0.909297i # Want: -0.000000+0.909297i t\pmc\float.t: not ok 23 - neg 0 # Failed test 'neg 0' # at t\pmc\float.t line 509 # '0' # doesn't match '/^-0/ # ' t\op\arithmetics.t: not ok 7 - turn a native number into its negative # Failed test 'turn a native number into its negative' # at t\op\arithmetics.t line 175. # got: '0 # 0 # -123.456789 # 123.456789 # 0 # 0 # -123.456789 # 123.456789 # ' # expected: '-0 # 0 # -123.456789 # 123.456789 # -0 # 0 # -123.456789 # 123.456789 # ' }}} The internal numeric representation seems not to be affected. In detail, this patch does not help. It's just the printer. {{{ Index: parrot-svn/src/ops/math.ops =================================================================== --- parrot-svn.orig/src/ops/math.ops +++ parrot-svn/src/ops/math.ops @@ -774,7 +774,17 @@ inline op neg(inout INT) :base_core { } inline op neg(inout NUM) :base_core { +#ifdef WIN32 + /* The msvcrt is broken for neg -0.0 */ + if ($1 == -0.0) { + $1 = -0.0; + } + else { + $1 = - $1; + } +#else $1 = - $1; +#endif } inline op neg(invar PMC) :base_core { @@ -786,7 +796,17 @@ inline op neg(out INT, in INT) :base_cor } inline op neg(out NUM, in NUM) :base_core { +#ifdef WIN32 + /* The msvcrt is broken for neg -0.0 */ + if ($2 == -0.0) { + $1 = -0.0; + } + else { + $1 = - $1; + } +#else $1 = - $2; +#endif } inline op neg(out PMC, invar PMC) :base_core { }}} " todo new normal testing trunk medium testing applied win32 Preferences