IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New NORM1 is a float, but
everything on the right of the equal sign is an int (actually, a 32 bit signed value. So all this stuff:
(m * ((4 * m * m) - 1) * (2 * m + 3) * (m + 1) / 3)

is being calculated int he integer domain, then is (implicitly) casted to float by the = operator. That's why "it's being treated as an integer and overflowing."

HTH
jb4
"There are two ways for you to have lower Prescription-drug costs. One is you could hire Rush Limbaugh's housekeeper ... or you can elect me President."
John Kerry
New Thanks!
I'm not used to worrying about such things. I appreciate the info!

Cheers,
Scott.
     Newbie C++ Builder problem with overflow. - (Another Scott) - (25)
         Re: Newbie C++ Builder problem with overflow. - (deSitter) - (19)
             Second paragraph in deS msg explains it - (Arkadiy) - (1)
                 Thanks! That did it. - (Another Scott)
             You're speaking over my head. - (Another Scott) - (16)
                 Re: You're speaking over my head. - (deSitter) - (15)
                     Thanks for the tips. Greatly appreciated. -NT - (Another Scott)
                     Actually, Ross... - (jb4) - (13)
                         Re: Actually, Ross... - (deSitter) - (12)
                             Hrm? - (jb4) - (11)
                                 Re: Hrm? - (deSitter) - (10)
                                     So what iron is that running on? - (jb4) - (9)
                                         Re: So what iron is that running on? - (deSitter)
                                         Also 12 on HPQ Presario 5831 (500 MHz Athlon)/gcc 2.95.4 -NT - (scoenye) - (7)
                                             Re: Also 12 on HPQ Presario 5831 (500 MHz Athlon)/gcc 2.95.4 - (jb4) - (6)
                                                 Re: Also 12 on HPQ Presario 5831 (500 MHz Athlon)/gcc 2.95.4 - (deSitter) - (5)
                                                     Sorry Ross: No Sale - (jb4) - (2)
                                                         Re: Sorry Ross: No Sale - (deSitter) - (1)
                                                             Please stand by... - (jb4)
                                                     Doesn't compile here - (pwhysall) - (1)
                                                         Gotta add -lm for math library -NT - (deSitter)
         Somewhat related: Borland Builder-IDE "style" issue. - (CRConrad) - (2)
             Well, I'm trying to reuse some earlier code. - (Another Scott)
             Dude.... - (jb4)
         NORM1 is a float, but - (jb4) - (1)
             Thanks! - (Another Scott)

I KNOW I shouldn’t think about it, I’ll scare myself to death but after seventeen hours in the air, I can’t get the worst case scenario out of my head.

No, not a plane crash. I’m convinced that I am breathing more farts than air.
266 ms