Re: ELF detector
From: Ken Smith (kensmith_at_green.rahul.net)
Date: 09/26/04
- Next message: John Woodgate: "Re: Teflon standoffs?"
- Previous message: ChrisGibboGibson: "Re: Battery level tester."
- In reply to: John Woodgate: "Re: ELF detector"
- Next in thread: John Woodgate: "Re: ELF detector"
- Reply: John Woodgate: "Re: ELF detector"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: John Woodgate: "Re: Teflon standoffs?"
- Previous message: ChrisGibboGibson: "Re: Battery level tester."
- In reply to: John Woodgate: "Re: ELF detector"
- Next in thread: John Woodgate: "Re: ELF detector"
- Reply: John Woodgate: "Re: ELF detector"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|