quarkcode wrote:
CBFalconer <cbfalco...@yahoo.comwrote:
>quarkcode wrote:
>>there is a function f. i need to check whether the value returned
by f is positive or negative but if the number overflows and shows
negative even when actually it is positive how can i check that
the number is really negative?
You can't. Once the overflow occurs all operation is classified as
"undefined behaviour". You have to detect the overflow before it
actually occurs. How to do this depends on the types and codes
involved.
--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>
--
Posted via a free Usenet account fromhttp://www.teranews.com
suppose i calculate f(x),the function being long enough and i
calculate using link list.Can i know at what point dring the
calculation is it going to overflow
if i want to trap overflow before it actually happens
Why is my sig, and my ISPs added sig, still present here? They are
plainly marked with sig markers. Are you crippled in some manner
that prevents operation of the selection and deletion keys? Is
this the same reason you fail to add blanks between sentences, and
fail to capitalize the personal pronoun 'I'?
--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>
--
Posted via a free Usenet account from
http://www.teranews.com