[CentOS] Strange C programming problem

2007-07-14 Thread fredex
I've got this little program I wrote to test something, and it keeps giving the wrong result. I'm not inexperienced in C, but I can't believe strtof (et al) are broken, so I must be doing something wrong. However, I've spent hours looking at this and comparing it to the man pages and don't see

Re: [CentOS] Strange C programming problem

2007-07-14 Thread Andy Green
Using an input of something other than 2.5 changes the middle two lines in some way in which I haven't yet discerned a pattern, but the result is still highly bogus. Adding -std=gnu99 to the compile makes it work, it seems by selecting a different strtof implementation in

RE: [CentOS] Strange C programming problem

2007-07-14 Thread Michael Velez
I've got this little program I wrote to test something, and it keeps giving the wrong result. I'm not inexperienced in C, but I can't believe strtof (et al) are broken, so I must be doing something wrong. However, I've spent hours looking at this and comparing it to the man pages and

Re: [CentOS] Strange C programming problem

2007-07-14 Thread fredex
On Sat, Jul 14, 2007 at 12:52:09PM -0400, Michael Velez wrote: I've got this little program I wrote to test something, and it keeps giving the wrong result. I'm not inexperienced in C, but I can't believe strtof (et al) are broken, so I must be doing something wrong. However,