Re: ELF detector

From: Ken Smith (kensmith_at_green.rahul.net)
Date: 09/26/04


Date: Sun, 26 Sep 2004 19:00:42 +0000 (UTC)

In article <bkJTvRCl5mVBFwXa@jmwa.demon.co.uk>,
John Woodgate <noone@yuk.yuk> wrote:
>I read in sci.electronics.design that Ken Smith
><kensmith@green.rahul.net> wrote (in <cj4o62$g7l$8@blue.rahul.net>)
>about 'ELF detector', on Sat, 25 Sep 2004:
>
>>I doubt software can do it. You need to divide by zero. Most
>>programmers have a hard time writing code that does that successfully.
>
>IF DIVISOR = 0, THEN RESULT = 1E+38 ELSE RESULT = DIVIDEND/DIVISOR
>
>It's the order in which you write it that matters. (;-)

ROSIVID/DNEDIVID = TLUSER ESLE 83+E! = TLUSER NEHT .0 = ROSIVID FI

Would yeld a different result but you haven't successfully divided by zero
since the logic of your code avoids the divide completely if the DIVISOR
is zero.

There is a trick you can use in C++ to do it. C++ allows all operators to
be overloaded. Thus in C++ you can make up you own rules about ADD,
SUBTRACT, MULTIPLY and DIVIDE to that 1/0 is perfectly legal.

In C++ you can make the main part of your program:

int main(void){ return 1/0; }

-- 
--
kensmith@rahul.net   forging knowledge


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)