Re: Symbol Substitution Mystery



VAXman- @SendSpamHere.ORG wrote:
In article <3cSdnaNs9bN1LuvVnZ2dnUVZ_hGdnZ2d@xxxxxxxxxxx>, "Richard B. Gilbert" <rgilbert88@xxxxxxxxxxx> writes:
VAXman- @SendSpamHere.ORG wrote:
In article <VKqdnXSH5OuUHOvVnZ2dnUVZ_jqdnZ2d@xxxxxxxxxxx>, "Richard B. Gilbert" <rgilbert88@xxxxxxxxxxx> writes:
Rob Brown wrote:
On Wed, 9 Jul 2008, AEF wrote:

Yes, that makes sense -- especially if division is performed by repeatedly subtracting .... (If that's not how it's done I'm all ears.)
I might have thought that it would use the divide instruction. On VAX the integer DIV instruction does one of two specific things on divide by 0, neither of which is to return 2**31 - 1. On Alpha, there is no integer divide instruction, but floating divide by zero causes a "Division by Zero Arithmetic Trap" and the value in the result register is UNPREDICTABLE.

I would have hoped that division by zero would have been special-cased.
Looks to me like returning 2**31 - 1 is special-casing divide by 0.

In a perfect world, what would you like it to do?


Since you should know better than to attempt division by zero, some sort of arithmetic trap seems appropriate. It's been a few years since I last attempted to divide by zero but I don't think I was EVER allowed to get away with it. Floating point divide by zero should both trap and set the result to "NAN" (not a number) if the hardware supports such a thing.
C'mon Richard, your old enough to remember the Bowmar Brain -- add, subtract,
multiply and integer divide (e.g. 5/3 = 1). I had one (well, Dad did and I'd
play with it for hours when he wasn't using it) and division by zero returned
a large number (I don't recall the specific value).

I may be old enough to remember the "Bowmar Brain" but I'm also old enough to have forgotten it, if I ever saw one!

Fair 'nuff. Your memory, they say, is the second thing to go. ;)


Okay, Okay, I had a temporary resurgence of mental power and Googled for "Bowmar Brain". It was a "4 banger" pocket calculator manufactured in 1971-1972. It sold for something like $200 US. These days you can get one for $0.50 and three Wheaties box tops.

I got a H-P scientific calculator a few years later; it had Square Root, Log, and Trig functions.

These days I crank up Excel for calculations I can't do on my fingers and toes!
.



Relevant Pages

  • Re: DataType Conversion Speed
    ... Then divide by zero to conver to percent. ... > - if either field contains a value, that's the discount, ... > Then divide by zero to conver to percent. ...
    (microsoft.public.access.modulesdaovba)
  • Re: fft2 and ifft2 outputs
    ... Dave Robinson ... ./ is this element by element divide? ... whereas correlation requires the conjugation of the second vector. ... The reason that you are getting a divide by zero error is because you ...
    (comp.soft-sys.matlab)
  • Re: DataType Conversion Speed
    ... > Then divide by zero to conver to percent. ... >> - if either field contains a value, that's the discount, ... >> Then divide by zero to conver to percent. ...
    (microsoft.public.access.modulesdaovba)
  • Re: How many mathematicians ...
    ... be divided by 7 before multiplying by 6. ... Who is trying to divide h by 7? ... No division by zero. ... gets to zero even if Bonehead wishes it so. ...
    (sci.physics.relativity)
  • RE: #Num! division with IIf statements
    ... Actually, as written, you can very possibly get a divide by zero. ... In reality it's not divided by zero, these are nulls divided by nulls. ... particular date-range that's where I get the #Num! ...
    (microsoft.public.access.reports)

Loading