1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00

(idbl2str): Don't omit sign when printing negative zero.

This commit is contained in:
Marius Vollmer 2002-05-22 13:50:20 +00:00
parent e9527dd63d
commit abb7e44d16

View file

@ -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))
{