public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Cygwin FCVT Bug
@ 1999-04-06  2:27 Kehl Hubertus
  1999-04-07 14:53 ` Chris Faylor
  1999-04-30 18:32 ` Kehl Hubertus
  0 siblings, 2 replies; 4+ messages in thread
From: Kehl Hubertus @ 1999-04-06  2:27 UTC (permalink / raw)
  To: 'cygwin@sourceware.cygnus.com'

Hi,
I encountered the following fcvt Bug in the C-Library of Cygwin. With
Borland C or gcc under Linux this
function works alright. The following sample demonstrates the bug, the
number 1130.0 should be converted
to zero digits after the decimal point, 1130 should be returned. Cygwin
returns 113 :(
Bye
Hubertus

#include <stdio.h>
#include <stdlib.h>
int main(void)
{
  double val=1130.0;
  int ndig=0;
  int dec;
  int sign;
  
  printf("%f#the following string should be 1130:#%s#\n",val,
fcvt(val,ndig,&dec, &sign));
  printf("#dec %d#sgin %d\n",dec,sign);
}

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Cygwin FCVT Bug
  1999-04-06  2:27 Cygwin FCVT Bug Kehl Hubertus
@ 1999-04-07 14:53 ` Chris Faylor
  1999-04-30 18:32   ` Chris Faylor
  1999-04-30 18:32 ` Kehl Hubertus
  1 sibling, 1 reply; 4+ messages in thread
From: Chris Faylor @ 1999-04-07 14:53 UTC (permalink / raw)
  To: Kehl Hubertus; +Cc: 'cygwin@sourceware.cygnus.com'

Thanks for reporting this.  I've alerted the folks responsible here.
It is fixed and will be available in a snapshot soon.

-chris

On Tue, Apr 06, 1999 at 11:28:13AM +0200, Kehl Hubertus wrote:
>I encountered the following fcvt Bug in the C-Library of Cygwin. With
>Borland C or gcc under Linux this
>function works alright. The following sample demonstrates the bug, the
>number 1130.0 should be converted
>to zero digits after the decimal point, 1130 should be returned. Cygwin
>returns 113 :(
>Bye
>Hubertus
>
>#include <stdio.h>
>#include <stdlib.h>
>int main(void)
>{
>  double val=1130.0;
>  int ndig=0;
>  int dec;
>  int sign;
>  
>  printf("%f#the following string should be 1130:#%s#\n",val,
>fcvt(val,ndig,&dec, &sign));
>  printf("#dec %d#sgin %d\n",dec,sign);
>}

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Cygwin FCVT Bug
  1999-04-07 14:53 ` Chris Faylor
@ 1999-04-30 18:32   ` Chris Faylor
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Faylor @ 1999-04-30 18:32 UTC (permalink / raw)
  To: Kehl Hubertus; +Cc: 'cygwin@sourceware.cygnus.com'

Thanks for reporting this.  I've alerted the folks responsible here.
It is fixed and will be available in a snapshot soon.

-chris

On Tue, Apr 06, 1999 at 11:28:13AM +0200, Kehl Hubertus wrote:
>I encountered the following fcvt Bug in the C-Library of Cygwin. With
>Borland C or gcc under Linux this
>function works alright. The following sample demonstrates the bug, the
>number 1130.0 should be converted
>to zero digits after the decimal point, 1130 should be returned. Cygwin
>returns 113 :(
>Bye
>Hubertus
>
>#include <stdio.h>
>#include <stdlib.h>
>int main(void)
>{
>  double val=1130.0;
>  int ndig=0;
>  int dec;
>  int sign;
>  
>  printf("%f#the following string should be 1130:#%s#\n",val,
>fcvt(val,ndig,&dec, &sign));
>  printf("#dec %d#sgin %d\n",dec,sign);
>}

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Cygwin FCVT Bug
  1999-04-06  2:27 Cygwin FCVT Bug Kehl Hubertus
  1999-04-07 14:53 ` Chris Faylor
@ 1999-04-30 18:32 ` Kehl Hubertus
  1 sibling, 0 replies; 4+ messages in thread
From: Kehl Hubertus @ 1999-04-30 18:32 UTC (permalink / raw)
  To: 'cygwin@sourceware.cygnus.com'

Hi,
I encountered the following fcvt Bug in the C-Library of Cygwin. With
Borland C or gcc under Linux this
function works alright. The following sample demonstrates the bug, the
number 1130.0 should be converted
to zero digits after the decimal point, 1130 should be returned. Cygwin
returns 113 :(
Bye
Hubertus

#include <stdio.h>
#include <stdlib.h>
int main(void)
{
  double val=1130.0;
  int ndig=0;
  int dec;
  int sign;
  
  printf("%f#the following string should be 1130:#%s#\n",val,
fcvt(val,ndig,&dec, &sign));
  printf("#dec %d#sgin %d\n",dec,sign);
}

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1999-04-30 18:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-04-06  2:27 Cygwin FCVT Bug Kehl Hubertus
1999-04-07 14:53 ` Chris Faylor
1999-04-30 18:32   ` Chris Faylor
1999-04-30 18:32 ` Kehl Hubertus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).