File: bug-11820.c

package info (click to toggle)
avr-libc 1%3A1.6.2.cvs20080610-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 14,848 kB
  • ctags: 55,619
  • sloc: ansic: 92,267; asm: 6,692; sh: 4,131; makefile: 2,481; python: 976; pascal: 426; perl: 116
file content (15 lines) | stat: -rw-r--r-- 344 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* bug #11820: wrong output with precision = 3
   $Id: bug-11820.c,v 1.1 2007/02/05 21:35:59 dmix Exp $
 */
#include <stdlib.h>
#include <string.h>

int main ()
{
#ifdef	__AVR__		/* dtostre() is not a standart C function.	*/
    char s[20];
    dtostre (1e-15, s, 3, 0);
    if (strcmp (s, "1.000e-15")) exit (__LINE__);
#endif
    return 0;
}