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:
parent
e9527dd63d
commit
abb7e44d16
1 changed files with 10 additions and 1 deletions
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue