f



Divide by zero does not crash

I noticed that my application does not crash when there is a divide by
zero.  For example, the following test code:

  int i;
  i = 10/0;
  printf("i = %d\n", i);

gives:

i = 0

It does not crash.

Is there a way to make the application crash when there is a divide by
zero?  I am running Linux 2.4.26 on a powerpc (MPC8248).  I compile
with powerpc-linux-gcc.
0
jobhunts02 (107)
2/7/2008 11:02:18 PM
comp.os.linux.powerpc 1164 articles. 0 followers. jobhunts02 (107) is leader. Post Follow

9 Replies
935 Views

Similar Articles

[PageSpeed] 29

Bill wrote:

> I noticed that my application does not crash when there is a divide by
> zero.  For example, the following test code:
> 
>   int i;
>   i = 10/0;
>   printf("i = %d\n", i);
> 
> gives:
> 
> i = 0
> 
> It does not crash.

Because it's a "div" operation on integer.

> Is there a way to make the application crash when there is a divide by
> zero?  I am running Linux 2.4.26 on a powerpc (MPC8248).  I compile
> with powerpc-linux-gcc.

Use float instead of int.

HTH...

        Dirk
-- 
Dirk Heinrichs          | Tel:  +49 (0)162 234 3408
Configuration Manager   | Fax:  +49 (0)211 47068 111
Capgemini Deutschland   | Mail: dirk.heinrichs@capgemini.com
Wanheimerstraße 68      | Web:  http://www.capgemini.com
D-40468 Düsseldorf      | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: www.keyserver.net
0
2/8/2008 7:08:13 AM
Dirk Heinrichs wrote:
> Bill wrote:
> 
>> I noticed that my application does not crash when there is a divide by
>> zero.  For example, the following test code:
>>
>>   int i;
>>   i = 10/0;
>>   printf("i = %d\n", i);
>>
>> gives:
>>
>> i = 0
>>
>> It does not crash.
> 
> Because it's a "div" operation on integer.
> 
>> Is there a way to make the application crash when there is a divide by
>> zero?  I am running Linux 2.4.26 on a powerpc (MPC8248).  I compile
>> with powerpc-linux-gcc.
> 
> Use float instead of int.
> 
> HTH...
> 
>         Dirk
You will not get an abend with float either:

  float f;
  f = 10.0/0;
  printf("f = %f\n", f);

  ./a.out
f = INF

An Abend is not good programming either, you should set a signal handle 
for integer and floating point exceptions: see <sys/signal.h>

/* SIGFPE */
#define FPE_INTDIV   20
#define FPE_INTOVF   21
#define FPE_FLTDIV   22
#define FPE_FLTOVF   23
#define FPE_FLTUND   24
#define FPE_FLTRES   25
#define FPE_FLTINV   26
#define FPE_FLTSUB   27

Cheers, John.

0
2/8/2008 12:49:46 PM
John W. Gillikin wrote:

> Dirk Heinrichs wrote:
>> Bill wrote:
>> 
>>> I noticed that my application does not crash when there is a divide by
>>> zero.  For example, the following test code:
>>>
>>>   int i;
>>>   i = 10/0;
>>>   printf("i = %d\n", i);
>>>
>>> gives:
>>>
>>> i = 0
>>>
>>> It does not crash.
>> 
>> Because it's a "div" operation on integer.
>> 
>>> Is there a way to make the application crash when there is a divide by
>>> zero?  I am running Linux 2.4.26 on a powerpc (MPC8248).  I compile
>>> with powerpc-linux-gcc.
>> 
>> Use float instead of int.
>> 
> You will not get an abend with float either:
> 
>   float f;
>   f = 10.0/0;
>   printf("f = %f\n", f);
> 
>   ./a.out
> f = INF

Hmm, you're right. However, I get at least a warning at compile time.

Bye...

        Dirk
-- 
Dirk Heinrichs          | Tel:  +49 (0)162 234 3408
Configuration Manager   | Fax:  +49 (0)211 47068 111
Capgemini Deutschland   | Mail: dirk.heinrichs@capgemini.com
Wanheimerstraße 68      | Web:  http://www.capgemini.com
D-40468 Düsseldorf      | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: www.keyserver.net
0
2/8/2008 2:26:46 PM
>   int i;
>   i = 10/0;

It's evaluated on compile time. So it can't crash (but it should result 
in a compiler error or warning).

-Michael
0
2/8/2008 3:48:47 PM
On Feb 8, 7:48 am, Michael Schnell
<mschnell_at_bschnell_dot...@aol.com> wrote:
> >   int i;
> >   i = 10/0;
>
> It's evaluated on compile time. So it can't crash (but it should result
> in a compiler error or warning).
>
> -Michael

This does give a warning at compile time because the constant zero is
there.  What concerns me is when the denominator is a variable that
takes the value of zero while the application is running. There is
neither a compilation warning nor any indication that a divide by zero
is occurring when the application is running.
0
jobhunts02 (107)
2/8/2008 4:56:40 PM
Bill <jobhunts02@aol.com> wrote in
news:68a88e30-09b5-439e-b9ca-b5a4cbbda73a@e10g2000prf.googlegroups.com: 

> On Feb 8, 7:48 am, Michael Schnell
> <mschnell_at_bschnell_dot...@aol.com> wrote:
>> >   int i;
>> >   i = 10/0;
>>
>> It's evaluated on compile time. So it can't crash (but it should
>> result in a compiler error or warning).

> This does give a warning at compile time because the constant zero is
> there.  What concerns me is when the denominator is a variable that
> takes the value of zero while the application is running. There is
> neither a compilation warning nor any indication that a divide by zero
> is occurring when the application is running.

The behavior of integer division by 0 is undefined per the C Language 
standard and, hence, implementation-dependent.  On x86, division by 0 
produces a hardware exception.  On x86 linux, this exception is presented 
to the program as a signal.  However, a conforming implementation may 
choose to do anything else that is convenient: nothing (leave quotient 
unmodified), produce random value for the quotient, kill the process.

GH
0
2/8/2008 7:57:48 PM
Bill <jobhunts02@aol.com> writes:

>On Feb 8, 7:48 am, Michael Schnell
><mschnell_at_bschnell_dot...@aol.com> wrote:
>> >   int i;
>> >   i = 10/0;
>>
>> It's evaluated on compile time. So it can't crash (but it should result
>> in a compiler error or warning).
>>
>> -Michael

>This does give a warning at compile time because the constant zero is
>there.  What concerns me is when the denominator is a variable that
>takes the value of zero while the application is running. There is
>neither a compilation warning nor any indication that a divide by zero
>is occurring when the application is running.

So PUT IN A TEST!!!
if (x==0)
{
   fprintf(stderr,"Divide by zero.\n");
   exit;
}
else
   i=10/x;

0
unruh-spam (2990)
2/8/2008 10:35:44 PM
Bill <jobhunts02@aol.com> writes:
>On Feb 8, 7:48 am, Michael Schnell
><mschnell_at_bschnell_dot...@aol.com> wrote:
>> >   int i;
>> >   i = 10/0;
>>
>> It's evaluated on compile time. So it can't crash (but it should result
>> in a compiler error or warning).

The compiler could insert code that crashes (or produces a signal or
whatever behaviour is deemed appropriate) at run-time.  But it does
not, because the behaviour when not doing an evaluation at
compile-time is not to crash or produce a signal.  In contrast, on an
AMD64 box I also get a warning at compile-time, and a SIGFPE at
run-time.

>This does give a warning at compile time because the constant zero is
>there.  What concerns me is when the denominator is a variable that
>takes the value of zero while the application is running. There is
>neither a compilation warning nor any indication that a divide by zero
>is occurring when the application is running.

Yes, that's a property of the PowerPC archictecture.  AFAIK the theory
of the hardware designers was that the compiler should produce code
equivalent to:

q=n/d;
if (d == 0)
  raise(SIGFPE);

The idea is that the check would be performed during the latency of
the division, so it would usually not cost extra time.  So one could
make the hardware simpler by not putting in the check there.  I may be
confusing PowerPC with another RISC architecture (most likely MIPS)
wrt this aspect, though.

But obviously gcc does not do this (there does not even seem to be an
option to turn this on).  Do other C compilers for PowerPC (from IBM,
Apple or Motorola generate such code)?

Followups set to comp.os.linux.powerpc.

- anton
-- 
M. Anton Ertl                    Some things have to be seen to be believed
anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen
http://www.complang.tuwien.ac.at/anton/home.html
0
anton (5320)
2/9/2008 12:29:41 PM
Bill wrote:
> I noticed that my application does not crash when there is a divide
> by zero.

I'd suggest to download the PowerPC ISA 2.05 from power.org.

On p.68 it states for integer divides, e.g. "divw":
"If an attempt is made to perform [...] <anything> � 0 then the contents 
of register RT are undefined [...]"

=> no exception

For _floating_point_ operations, on p.111 it states:
"A Zero Divide Exception occurs when a Divide instruction is executed 
with a zero divisor value and a finite nonzero dividend value."


0
hpatzke (8)
2/11/2008 10:02:04 AM
Reply:

Similar Artilces:

Zero Divided By Zero
http://standards.ieee.org/reading/ieee/interp/754-1985.html 0 REMZERO DIVIDED BY ZERO 1 REM 2 REMPRIOR TO THE YEAR 806, 3 REMTHIS PROBLEM WAS SOLVED 4 REMOR IT WASN'T A PROBLEM^J 10 LET A = 0 20 LET B = 0 30 GOSUB 100DIVIDE 40 PRINT A " / " B " = " V$ 50 END:^J 100 REMDIVIDE A BY B 110 REMCHECK FOR DIVISION BY ZERO 120 IF B THEN V = A / B : V$ = STR$(V) : RETURN 130 REMCHECK FOR ZERO DIVIDED BY ZERO -- DEC 6, 2006 140 IF (A) THEN V$ = "NOT A NUMBER" : RETURN 150 V$ = "NULLITY" : RETURN ( this is not a test, this topic was posted in order to embed...

[News] Making Linux More Like OS X and OS X More Like Linux
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Mac OS X - Highly Customized Linux ,----[ Quote ] | Few players in the Linux arena creates their Linux distro to look like Mac OS | X or Windows.... | | Here I'm going to list some distro which looks like Mac OS. `---- http://linuxtreat.blogspot.com/2008/07/mac-os-x-highly-customized-linux.html A Linux User's Guide to Mac ,----[ Quote ] | Take a deep breath and repeat after me: A computer is just a tool. It is only | so good as it serves to make life better for users. A "better" life is | obviously not the same thing for everyone. For me, it means making my Mac | more like Linux, as I began to discuss in my last article. `---- http://www.ofb.biz/safari/article/474.html Yesterday: Ubuntu: Challenge the Mac ,----[ Quote ] | Normally I would just provide a Diigo link to this if it weren’t something | I’ve been saying a lot in talks. Over at InformationWeek, Serdar Yegulaip was | a piece called “Shuttleworth’s Ubuntu Ambitions: Challenge the Mac”. He | quotes Mark Shuttleworth saying in a Datamation article: | |     … our goal, very simply, is to make sure the Free software ecosystem can |     deliver a Mac OS-like experience, or an experience that will compete with |     the Mac OS. | | I think this is exactly right. It’s time to look past Windows, even with its | huge installed base, as any sort of “gold standard” (as Mark calls it), | especially for user interface. ...

Linux, Linux, Linux
Hi, Interested in trying Linux? Well you came to comp.os.linux.advocacy for some reason, and you probably won't stay long. Here's a list of Linux distributions to choose from. Ubuntu http://www.ubuntu.com Newbie friendly and good support forums. SuSE http://www.novell.com/linux Pay for some support if you're not opposed to spending a little money. Fedora Core http://fedoraproject.org If you're more comfortable with your computer, try this one out. If you get frustrated, don't give up so easy. There is a wealth of information online for whichever distro you choose....

Crash-Crash-Crash
Eudora's acting up agian. Latest release, it's been doing this since I paid to upgrade to 6. (nice reward eh?) It runs fine for a few days, then it gets into a fit of crashing. When it crashes, on the next time I run the program, tons of emails that I had already received and filtered are in my inbox, unfiltered, with a few new ones. Sometimes I don't even get done cleaning the mess from the crash before it crashes again. Now I have thousands of duplicate mails in all my mail folders, and no practical way to find and eliminate them.. -- www.MicroBrix.com Little boxes that make life easier. "Dave VanHorn" <dvanhorn@cedar.net> wrote > When it crashes, on the next time I run the program, tons of emails that I > had already received and filtered are in my inbox, unfiltered, with a few > new ones......> Now I have thousands of duplicate mails in all my mail > folders, and no practical way to find and eliminate them.. Question: Do you have Tools > Options > Incoming Mail > "leave mail on server" checked? If so, you keep on picking up the same mail from the server. Something is happening that convinces the server that you haven't picked it up form the same machine before. Is it a laptop that changes connection points? > Question: Do you have Tools > Options > Incoming Mail > "leave mail on > server" checked? Nope. ...

[News] Interview with Developer of Chrome OS Zero (GNU/Linux Desktop)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Interview: Chrome OS Zero’s Hexxeh ,----[ Quote ] | From Chrome OS Diet to Cherry and now the | latest, Zero, Hexxeh has been the primary | source for Chrome OS build releases ever | since Google released the Chromium code to | the masses in November. They’ve been | popular mostly because they work with a | lot of existing hardware, plus the builds | are small enough to fit on any USB drive. | We got a chance to ask some questions of | Hexxeh, who just released Chrome OS Zero a | few days ago and talks about how he got | started, futur...

[News] Chromium OS Zero (GNU/Linux based on Google Code) is Released
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Chromium OS Zero has arrived !! |With Installation instructions for Linux| ,----[ Quote ] | Chromium OS Zero is released , is what | announced today Hexxeh in his blog, The new | update comes with many improvements `---- http://www.unixmen.com/news-today/706-chromium-os-zero-released- Recent: Need Fast Web Access? Try Chromium OS on a Stick ,----[ Quote ] | As we reported earlier, a Twitter user Hexxeh | has brewed a version of Chromium that boots a | Windows, Linux or Mac computer from a USB | drive. The latest build requires an empty U...

RE: Re: What is zero divided by zero?
Janos, Are you talking about a discrete form of algebra which has no zero. Zero is in the axioms of our mathematics system, it is not a construct of it. If we have the concept of unity, then zero is the concept associated with the absence of that quantity. In this sense it is an abstract limit quantity by definition and has no association with physical realization of the concept. The concept of "nothing" is I think different from zero as this has the implication to me of the inverse set of the set of all sets. The question of a quantum limit is just a matter of what we define...

Crashes in IDL 7.1 & 8.0, interactive + VM mode, linux and Mac OS X
I've found that a RESTORE of SAVE'd system variables often causes a crash [or failed assertion] inside glibc [on linux] and inside malloc [on OS X]. The crash doesn't occur immediately, it happens during subsequent actions at some point. I've been able to put together a modest tarball with code required to reproduce the error, but I've given up looking for the instructions on "this is how you report bugs to us so we can fix them, without going through your local provider or another few hoops". So, I'm posting here [where I infrequently visit, nowadays, although I was 'big' back in the nineties ;-], in the hope that someone'll pick it up and run with it [maybe someone from VNI/RSI sees it]. The SAVE/RESTORE sequence can be right after one another, so it's not like the content of the sysvars should change... Anyhow, here's a link to the tarball: http://folk.uio.no/steinhh/idl/crashing.tar.gz Download, unzip/tar, make sure the directory ["crashing"] is writeable, cd into it, start IDL, do "@setup_crash". After that, calling the procedure "crash" will save+restore system variables, and call a set of functions that'll provoke the crash. The setup_crash file also writes a "crash.sav" file that can be used to provoke the crash in VM mode (idl -vm=crash.sav). Hope this "works" for everyone else ;-) I've realized that I'll need to find a wo...

[News] [Linux] New PowerPC with Linux Preinstalled
PowerPC CPU module runs Linux on 24VDC ,----[ Quote ] | INAT GmbH is shipping a PowerPC-based PC/104 CPU module that | targets industrial applications requiring 24VDC power. The board | is based on a 266MHz AMCC 405EP processor and includes RAM and | flash memory, and Ethernet and serial ports, and comes with Linux | 2.4.25 pre-installed. `---- http://www.linuxdevices.com/news/NS8072583364.html ...

Linux should disown elementary OS Linux for the Scam that it is.
No Problem'o, DooFuS. I can blame it all on the Linux Mint TEXT size being = too small on my 19 inch monitor. As Moi was saying... I tried two more additional downloads of elementary OS Linux. Both of them= likewise failed. While they could have been discriminating against Moi for his ZERO contribu= tion, I will be damned if I am going to PAY GOOD money for something when t= here is no guarantee that the stupid DOWNLOAD wont fail, JUST TO FIND OUT t= hat it WONT work at all on my computer hardware, let alone whether OR NOT i= t will actually do what is being claimed. Moi has NEVER experienced a download problem with Linux Mint. From what I have seen, elementary OS Linux is a scam, much like those Windo= ws come ons that claim that they can fix your computer problems merely by m= ucking with the Windows Registry. The Linux World should disown elementary OS Linux for being the Scam that i= t is. Or, can any phony distro claim to be Linux? Yeah, where are the Linu= x police? On 7/8/2015 8:22 AM, John Gohde wrote: > No Problem'o, DooFuS. I can blame it all on the Linux Mint TEXT size > being too small on my 19 inch monitor. I blame it on your small cerebrum. > The Linux World should disown elementary OS Linux for being the Scam > that it is. Or, can any phony distro claim to be Linux? Yeah, where > are the Linux police? The Linux police are outside your door right now. I'm not kidding. Look out...

Crash when restarting from OS 9 but not OS X
Hello! I have a beige G3/266 minitower that has been upgraded with a Sonnet G4/500 ZIF, Rev. B ROMs, two 120GB hard drives, 768MB RAM, and a Sonnet Tempo Trio FireWire/USB2 card. One hard drive is partitioned into two parts so as to allow OS X 10.2.6 to boot; the OS X partition is 7.9GB while the rest is allocated to OS 9 and applications. The system has been running fine for a year in OS X, but a few weeks ago I found the need to go back to OS 9 to run an old program. Booting into OS 9 works -- but restarting from there freezes the machine, whether I'm trying to boot back into ...

[News] Mobile Linux Runs Palm OS Applications; New 3G Linux Phones; Open Linux Phone Made More Attractive
Mobile Linux running Palm OS apps demoed ,----[ Quote ] | Access hopes ALP and its Eclipse-based Developer Suite will | provide a long-awaited forward migration path for the many | thousands of "Garnet OS" (recently renamed from "Palm OS") | applications developed throughout the decades since "Palm-Pilot" | first became a household word, in the 1980s. `---- http://www.linuxdevices.com/news/NS2968683379.html Linux powers pair of 3G dual-mode phones ,----[ Quote ] | MontaVista says its device-oriented Linux operating system was | used in two new 3G business smartphones from Italian handset | designer Enteos. `---- http://www.linuxdevices.com/news/NS9710475530.html Open Linux developer phone opens up more ,----[ Quote ] | Trolltech has loosened key licensing restrictions on its | user-modifiable Linux-based mobile phone for open source software | developers. Users of the Greenphone will no longer be restricted to | running Qtopia software on the device, nor to using the device only | in its supplied hardware/software configuration. `---- http://www.linuxdevices.com/news/NS4872069549.html Roy Schestowitz <newsgroups@schestowitz.com> espoused: > Mobile Linux running Palm OS apps demoed > > ,----[ Quote ] >| Access hopes ALP and its Eclipse-based Developer Suite will >| provide a long-awaited forward migration path for the many >| thousands of "Garnet OS" (recently renamed from "Palm OS") >| a...

CM:SF ... crash ... crash ... crash ... crash ...
Get to map, click on vehicle, watch the game hang for a weirdly long time while the unit data is populated. Then click on any second vehicle and - whack! - desktop city. Every time. That's two in a row for Battlefront. I'm starting to believe that their eLicensing is a moot point, since they don't seem to be able to release anything in a working state. And I'm just loving some of the tech support posts in their forums. Lots of problems with multicore systems and nVidia GPUs - but heck, it's not like 3D game fans gravitate towards dual-core CPUs and...

[News] [Linux] Linux Has Advantage in the Mobile OS World
How Linux morphed from a server to a mobile OS ,----[ Quote ] | When evaluating Linux as a possible OS candidate, it is important to | remember that the Linux "model" for mobile devices is horizontal. That | is, Linux is not presented as a vertically integrated top to bottom | solution for a mobile device supplied by one vendor. | | It's a sharp contrast to the other OS suppliers such as Microsoft | with Windows Mobile, Symbian and PalmSource. These suppliers | support a highly integrated software stack, incorporating not | only an OS but also extensive middleware and applicati...

ROX Linux and ROX on OS X and arm linux
Hi I've just just done some searches on Google for ROX linux, and ROX on other platforms. I've not managed to find anything. Is ROX available for OS X? Is ROX available for Acorn\Iyonix Arm linux? Did ROX Linux ever come to anything? I was a member of the mailing list a while ago, it started off interesting and then seemed to go off on a tangent then it all went quiet. It seemed like an excellent idea, a linux distro structured like RISC OS. It would have been an ideal compliment to a RISC OS system, same UI but different set of applications (probably not quite so consiste...

OT: linux, FC5 (having trouble with alt.os.linux)
I apologize profusely for posting this topic to this newsgroup but either I'm having trouble with alt.os.linux (going on a few days now) or it's having trouble and I don't know which it is (maybe some one else knows). I figured someone here would be knowledgeable enough to help me and/or let me know if my posting problems are mine or the newsgroups (BTW, I've posted from my work and home without luck but they may both use the same ISP). Well, if you've read this far...here's my (attempted?) post to the other group: Topic: shutdown broadcast not showing up for us...

[News] [Linux] Walkthroughs of Sidux (Linux) and Nexenta OS
Nexenta OS Alpha 7 Screenshot Tour ,----[ Quote ] | Nexenta OS (elatte) Alpha 7 is now available. Release Highlights: | OpenSolaris & NWS build 61 (non-debug); installer - new | partitioning wizard, installer log (via F3), usabilityf | ixes, built-in driver availability detection... `---- http://osdir.com/Article9845.phtml sidux 2007-02 Preview 1 Screenshot Tour ,----[ Quote ] | What's on the menu: Debian sid, up to date as of 2007-05-13; kernel | 2.6.21.1 (SMP, voluntary preemption, mac80211); minimal, but fully | functional KDE 3.5.6 (en + de); completely overhauled early boot | sequence; largely adapted installer and graphical installer | front-end; enhanced installer for meta tasks; new artwork;o | ffline manual... `---- http://osdir.com/Article9846.phtml Related: Sidux: A live CD for Debian unstable ,----[ Quote ] | It's a rare distribution that impresses me before I've even tried it, | but sidux did just that when, a few hours after I'd downloaded and | burned a two-day-old preview release, the project announced that the | next release was available for download. `---- http://distrocenter.linux.com/distrocenter/07/02/28/1017239.shtml?tid=127 SIDUX 2007-01 Linux LiveCD ,----[ Quote ] | Screenshots gallery `---- http://www.phoronix.com/scan.php?page=article&item=655&num=1 Testdriving Sidux 2007 ,----[ Quote ] | Sidux ships with a 2.6.20 kernel, Xorg 7.1.1, gcc 4.1.2, and KDE | 3.5.5. Iceweasel 2.0.0.1 appears to be the default...

Divide By Zero
Hi Friends, I am trying following code int main(void) { try { int i,j,k; i=10; j=0; k= i/j; } catch(...) { printf("Erro!~"); return 1; } return 0; } Here it's divide by Zero error. Now using MSVC compiler. the code flow lands up in catch block. but gcc comiler the code simply throws "floating point exception" can terminates. Any comments?? Neo wrote: > Hi Friends, > I am trying following code > > int main(void) > { > try > { > int i,j,k; > i=10; >...

Divide by zero.
Dear all, Assume I have two big arrays A and B. And I want to element-wise divide A by B. When an element of B is zero, the results are also zero. Such as A = { 2, 4, 0, 6} B = { 1, 0, 0, 2} ----------------------------------------- R = { 2, 0, 0, 3} Any fast way to avoid the slow 'if' operation. Thanks, Shuisheng shuisheng wrote: > Assume I have two big arrays A and B. And I want to element-wise > divide A by B. When an element of B is zero, the results are also > zero. > > Such as A = { 2, 4, 0, 6} > B = { 1, 0, 0, 2} >...

Divide by ZERO
From time to time my program shutdown for no apparent reason. Try as I may, I could not resolve this random shutdown of the program. I have CAVO 2.6. I have used the following code extracted from a previous post for some time now. IF oError:GenCode = EG_ZERODIV // divide by zero error // Float divide error - return 0.0 value by default // can replace the need for special DIV function RETURN 0 ENDIF A recently written routine which used FLOATS extensively has presented me with DYNAMIC MEMORY LOW errors. After much research in this group, I found a post in referenc...

Divide by zero...
All... I have a query that calculates various using variables from a survey database. As with any survey, there are many instantces of null values. I'm wondering if there is any way to escape the error caused by dividing by zero or null values. The specific message i get is: ERROR: floating point exception! The last floating point operation either exceeded legal ranges or was a divide by zero Is there a simple trick that won't make my queries excessively complex? Many thanks. Mike ---------------------------------------- This mail sent through www.mywater...

Zeros or Zeroes?
For some reason I seem to prefer "zeroes" with an e when it stands alone, but "zeros" when it's a compound word like "all-zeros". Is there a C standard for this? Is it a Left-pond / Right-pond issue? These are the issues we need to hammer out!! ;-) -- Mabden p.s. Can Zero ever be Off Topic in c.l.c? Mabden said the following, on 10/24/05 09:09: > For some reason I seem to prefer "zeroes" with an e when it stands > alone, but "zeros" when it's a compound word like "all-zeros". > > Is there a C standard for ...

divide by zero
hi, I'm trying to develop a pcell. I have an expression like: if(n>>1 then tmp = foo/(n-1)) When compiling, i have an error message: *Error* quotient: Attempted to divide by zero - (0.0 0) how to solve this problem ? Thanks ^^ bedoune@gmail.com wrote, on 02/14/08 01:01: > hi, > > I'm trying to develop a pcell. > I have an expression like: > if(n>>1 then > tmp = foo/(n-1)) > > When compiling, i have an error message: > *Error* quotient: Attempted to divide by zero - (0.0 0) > > how to solve this problem ? > > Thanks ^^ > ...

Divide by Zero
When I specify a formula between Computed Column Specification, I have two zero values, getting Divide by Zero error, any idea how can I avoid this? I still want SQL Server to display Zero if it is 0/0, is this possible in SQL Server database? Thanks J. use case, here is an example create table #test (value1 numeric (12,2),value2 numeric (12,2)) insert into #test select 1,0 union all select 1,0 union all select 5,3 union all select 4,2 select case value2 when 0 then 0 else value1/value2 end as SomeValue from #test http://sqlservercode.blogspot.com/ IF like this: Update a Set X=c...

Web resources about - Divide by zero does not crash - comp.os.linux.powerpc

Global digital divide - Wikipedia, the free encyclopedia
causing some countries to fall behind in technology, education, labor, democracy, and tourism. The concept of the digital divide was originally ...

Facebook Launches Trending for Android, Divides Topics Into Sections
... network Wednesday, as the feature is now available via Android for mobile users (with iOS “coming soon”), and trending topics are now divided ...

RT Play - EU migrant quotas divide - Facebook
Europe's refugee crisis has already been dubbed the worst since WWII, with a record number of 107,500 asylum seekers crossing the EU's borders ...

Divide
Get Divide on the App Store. See screenshots and ratings, and read customer reviews.

Collection: The Great Bristol Divide
You aren't signed in Sign In Help Home The Tour Sign Up Explore Explore Home Last 7 Days Interesting Popular Tags Calendar Most Recent Uploads ...

Husker Du - Divide and Conquer - YouTube
Lyrics: Well they divided up all the land And we've got states and cities Cities have their neighborhoods And more subdivisions There's countries ...

The cultural divide, and how UAE might bridge it
If self-segregation of Emiratis and expatriates takes root in schools, it can grow into inaccurate and damaging stereotypes among adults, Asmaa ...

Associate Bonus Watch: Erasing The New York/Non-New York Divide
This firm is now paying all associates on the same scale, regardless of office location, and people seem pretty happy about it.

Marine park divides Easter Island's indigenous Rapa Nui
Some worry the marine park will prevent them from feeding their families and say it is a form of colonialism.

Vertical Divide is a challenging new numerical puzzle game
Vertical Divide Threes! Threes! Free The Mesh Vertical Divide is a challenging new numerical puzzle game is a story by AppAdvice.

Resources last updated: 3/11/2016 12:28:56 AM