Opened 14 years ago
Closed 11 years ago
#566 closed defect (fixed)
Cygwin doesn't display -0.0 correctly
Reported by: | johnwcowan | Owned by: | felix winkelmann |
---|---|---|---|
Priority: | minor | Milestone: | 4.9.0 |
Component: | unknown | Version: | 4.8.x |
Keywords: | Cc: | ||
Estimated difficulty: |
Description
CHICKEN
(c)2008-2011 The Chicken Team
(c)2000-2007 Felix L. Winkelmann
Version 4.6.7
windows-cygwin-x86 [ manyargs dload ptables ]
compiled 2011-04-13 on LNGNYCL-FDB00M1 (CYGWIN_NT-5.1)
#;1> (define nz (/ -1.0 +inf.0))
#;2> nz
0.0
This is probably happening because Chicken uses newlib rather than glibc. -0.0 should be detected as a special case in all Chickens and printed correctly, so as not to depend on the C library.
Change History (8)
comment:1 Changed 14 years ago by
Milestone: | 4.7.0 → 4.8.0 |
---|---|
Owner: | set to felix winkelmann |
Status: | new → assigned |
comment:2 Changed 14 years ago by
Priority: | major → minor |
---|
comment:3 Changed 14 years ago by
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
comment:5 Changed 11 years ago by
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
comment:6 Changed 11 years ago by
Version: | 4.6.x → 4.8.x |
---|
I'm reopening this, because there seems no reason not to fix it. Granted that it's Cygwin-specific, still it's a nasty bug. Negative 0.0 should be displayed as -0.0 on all platforms, not just where the C library happens to support it.
comment:7 Changed 11 years ago by
It looks like ripping out HAVE_GCVT from Makefile.cygwin fixes this issue. I've asked Felix why it was introduced in the first place (gcvt is deprecated in POSIX)
I'm not sure if this should be handled at the Scheme level, since inexact arithmetic is so fundamentally tied to the C runtime.