# 1/0 <> ERROR but becomes somthing like INF

Page 1 of 1

## 3 Replies - 1791 Views - Last Post: 02 December 2008 - 09:42 PM

### #1 oldSwede

• D.I.C Regular

Reputation: 4
• Posts: 464
• Joined: 08-January 16

# 1/0 <> ERROR but becomes somthing like INF

Posted 02 December 2008 - 12:09 PM

I just wonder....

If you in VB.NET try to do somthing like integerVariable = 1/0 you will not get an error but there will be a result, represented with somthing like INF.

...is this good or even reasonalble?

From a mathematical point of view I'd assert that 1/0 is undefined and thus the "answer" INF is really bad.

Any thoughts?

Regards
/Jens

Is This A Good Question/Topic? 0

## Replies To: 1/0 <> ERROR but becomes somthing like INF

### #2 William_Wilson

• lost in compilation

Reputation: 207
• Posts: 4,812
• Joined: 23-December 05

## Re: 1/0 <> ERROR but becomes somthing like INF

Posted 02 December 2008 - 12:28 PM

Since Infinity is not a number, but rather a word/symbol to represent the idea of a large number, larger than any number which can be written, it is fine. All the language is doing, is catching the error and returning a value of INF, instead of an error or undefined. In complex mathematics infinity is more correct as 1/0 is impossible, so the answer is instead interpreted as a limit as the denominator approaches 0, which causes the answer to approach infinity.

### #3 cfoley

• Cabbage

Reputation: 2388
• Posts: 5,013
• Joined: 11-December 07

## Re: 1/0 <> ERROR but becomes somthing like INF

Posted 02 December 2008 - 04:45 PM

What happens when you try and perform mathematical operations on INF in VB? Does it keep on returning INF or does it generate an error then?

I prefer my errors to be generated as early as possible. It makes debugging so much easier... and I can't think of a time when I would actually want INF instead of a division by zero error. It gets a thumbs down from me but at the same time, it's hardly the end of the world.

### #4 KYA

• Wubba lubba dub dub!

Reputation: 3202
• Posts: 19,233
• Joined: 14-September 07

## Re: 1/0 <> ERROR but becomes somthing like INF

Posted 02 December 2008 - 09:42 PM

If you want the limit of a diverging series maybe...

Calculus II exam on Friday! Whooo hooooooooo!