Re: indeterminate 0/0

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



And that indeterminate makes sense, too.

numerator/demoninator = Quotient

which means that
numerator = Quotient * denominator

If the denominator is 0 and the numerator is non-zero, there are no non-zero
numerators that could make:
numerator = quotient * 0
correct.

If both the denominator and numerator = 0, then there are way too many correct
answers that make this:

0 = quotient * 0
(0 * any number = 0, so all numbers are correct)





Dana DeLouis wrote:

"divide by zero" error. I need a way to override this error but need
0/0 to equal 1

Hi. Just for discussion, 0/0 is an "Overflow" error.

Sub Demo()
Dim Ans
On Error Resume Next

'// 6 Overflow
Ans = 0 / 0
Debug.Print Err.Number; Err.Description

'// 11 Division by zero
Ans = 2 / 0
Debug.Print Err.Number; Err.Description

'// Maybe...
If Err.Number = 6 Then Ans = 1
Err.Clear
On Error GoTo 0
End Sub

(But you are correct, certain math programs treat 0/0 as Indeterminate vs
Excel's Overflow)
--
HTH. :>)
Dana DeLouis
Windows XP, Office 2003

"integreat" <integreat.2bs16u_1154293808.7403@xxxxxxxxxxxxxxxxxxxxx> wrote
in message news:integreat.2bs16u_1154293808.7403@xxxxxxxxxxxxxxxxxxxxxxxx

Is there a way to force VBA to do a division by zero without giving the
"divide by zero" error. I need a way to overrride this error but need
0/0 to equal 1


--
integreat
------------------------------------------------------------------------
integreat's Profile:
http://www.excelforum.com/member.php?action=getinfo&userid=34282
View this thread: http://www.excelforum.com/showthread.php?threadid=566460


--

Dave Peterson
.



Relevant Pages

  • Re: Decimal versus binary arithmetic was Re: J4 - presentation/discussion on "Future of the COBO
    ... 01 numerator value 1 binary pic 9. ... 01 denominator value 5 binary pic 9. ... 01 quotient binary pic 9v9. ... SYSLIT AT +42 ...
    (comp.lang.cobol)
  • Re: Conflicting needs for __init__ method
    ... single integer, another Rational instance, and perhaps floats, Decimal ... And when initializing from a pair of integers---a numerator ... sure that the denominator is positive. ... like negation or raising to a positive integer power, ...
    (comp.lang.python)
  • Re: infinite product
    ... This result generalizes to products with an arbitrary number of numerator and denominator terms. ... Note that this does not always give interesting formulae, since both sides may be zero because of poles of Gamma. ... It is for this reason that it is advisable to keep x in formula. ...
    (sci.math)
  • Re: Convert decimal to fraction string
    ... You can specify the maximum denominator to use in the ... Dim GCD As Long ... Dim TopNumber As Long ... Dim Numerator As Long ...
    (microsoft.public.vb.general.discussion)
  • Re: Invalid setting in TransferFcn block G for parameter Denominator
    ... Most Simulink parameters are stored as strings, so you need: ... set_param(Ghandle, 'Numerator', 'Gnum'); ... set_param(Hhandle, 'Denominator', 'Hden'); ... The analog block is a TransferFcn block and the digital block is a Discrete Filter. ...
    (comp.soft-sys.matlab)