digitalmars.D.bugs - float number parse bug?
- Ilya Zaitseff (8/8) Nov 21 2004 [DMD 0.106]
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (9/25) Nov 21 2004 Looks like a D bug...
- Thomas Kuehne (6/14) Nov 22 2004 Added to DStress as:
[DMD 0.106] <fparsebug.d> import std.stdio; void main() { float a = .1.234; writefln(a); // outputs 0.1 }
Nov 21 2004
Ilya Zaitseff wrote: <fparsebug.d>import std.stdio; void main() { float a = .1.234; writefln(a); // outputs 0.1 }Looks like a D bug... gdc also happily outputs 0.1 This corresponding C code: <fparsebug.c>#include <stdio.h> int main() { float a = .1.234; printf("%f\n",a); return 0; }Gives an error with gcc:fparsebug.c:5:13: too many decimal points in numberWhich seems like a better response ? --anders
Nov 21 2004
Added to DStress as: http://svn.kuehne.cn/dstress/nocompile/float_litaeral_dec_12.d .. http://svn.kuehne.cn/dstress/nocompile/float_litaeral_dec_17.d Thomas Ilya Zaitseff schrieb am Sun, 21 Nov 2004 22:50:16 +1000:[DMD 0.106] <fparsebug.d> import std.stdio; void main() { float a = .1.234; writefln(a); // outputs 0.1 }
Nov 22 2004