public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Kehl Hubertus <Hubertus.Kehl@icn.siemens.de>
To: "'cygwin@sourceware.cygnus.com'" <cygwin@sourceware.cygnus.com>
Subject: Cygwin FCVT Bug
Date: Fri, 30 Apr 1999 18:32:00 -0000	[thread overview]
Message-ID: <197A67E1DB8DD211A4670008C728B7040B64CA@mchh220e.demchh201e.oen.siemens.de> (raw)
Message-ID: <19990430183200.xF4y9fp6WU6d541gHQA0wRMYH177I5mVXpYCkFYRbMo@z> (raw)

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


             reply	other threads:[~1999-04-30 18:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-04-06  2:27 Kehl Hubertus [this message]
1999-04-07 14:53 ` Chris Faylor
1999-04-30 18:32   ` Chris Faylor
1999-04-30 18:32 ` Kehl Hubertus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=197A67E1DB8DD211A4670008C728B7040B64CA@mchh220e.demchh201e.oen.siemens.de \
    --to=hubertus.kehl@icn.siemens.de \
    --cc=cygwin@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).