HCoop
/
bpt
/
guile.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e9527dd
)
(idbl2str): Don't omit sign when printing negative zero.
author
Marius Vollmer
<mvo@zagadka.de>
Wed, 22 May 2002 13:50:20 +0000
(13:50 +0000)
committer
Marius Vollmer
<mvo@zagadka.de>
Wed, 22 May 2002 13:50:20 +0000
(13:50 +0000)
libguile/numbers.c
patch
|
blob
|
blame
|
history
diff --git
a/libguile/numbers.c
b/libguile/numbers.c
index
c1f2d93
..
3a50f6c
100644
(file)
--- a/
libguile/numbers.c
+++ b/
libguile/numbers.c
@@
-2076,7
+2076,16
@@
idbl2str (double f, char *a)
int exp = 0;
if (f == 0.0)
- goto zero; /*{a[0]='0'; a[1]='.'; a[2]='0'; return 3;} */
+ {
+#ifdef HAVE_COPYSIGN
+ double sgn = copysign (1.0, f);
+
+ if (sgn < 0.0)
+ a[ch++] = '-';
+#endif
+
+ goto zero; /*{a[0]='0'; a[1]='.'; a[2]='0'; return 3;} */
+ }
if (xisinf (f))
{