flat assembler
Message board for the users of flat assembler.

 Index > Heap > Stupid assembly math :-D Goto page Previous  1, 2
Author
THEWizardGenius

Joined: 14 Jan 2005
Posts: 382
Location: California, USA
THEWizardGenius
Wow, I'm brilliant! But it's only true on the computer. However, if we speak of such things philosophically, I guess it's correct in all cases.

PS: lol. Now, thanks to you, if we delete smiddy's post, the submit button will still be soooooooooooooooooooooooo far away!
13 Jul 2005, 00:26
smiddy

Joined: 31 Oct 2004
Posts: 559
smiddy
Now, considering that Eistien was a relativist, then perhaps infinity and zero are relative terms. Therefore ∞ = 0 and therefore, INT 0h = ∞ = 0. That is if all things are equal.
13 Jul 2005, 02:40
decard

Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
Lucky you that I wasn't lazy this time and removed all those '0's and 'o's. Please don't do that again
13 Jul 2005, 07:26
vid
Verbosity in development

Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
Lucky you WE were lazy to write them all, we just wrote some first 20-30 of infinite, that's 0%, and that means nobody wrote nothing, so what the hell are you talking about? (math thinking rules!)
13 Jul 2005, 10:03
smiddy

Joined: 31 Oct 2004
Posts: 559
smiddy
decard wrote:
Lucky you that I wasn't lazy this time and removed all those '0's and 'o's. Please don't do that again

Sorry, I suppose I should have edited it when it was pointed out by vid. It won't happen again, ok?
13 Jul 2005, 11:32
MCD

Joined: 21 Aug 2004
Posts: 604
Location: Germany
MCD
Well, finding out what infinity actually looks like with general purpose integer math is quiet hard, but hopefully, the x87 FPU has build-in infinity ! So we can calculate infinity with the FPU, store the result to memory and look what it's like! Try this
Code:
```finit
fld1
fldz
fdivp;this is where the magic happens
fistp [somevar]
```

Depending on the size of "somevar", we get infinity=8000h for word,
infinity=80000000h for dword and infinity=8000000000000000h for qword. qed?

_________________
MCD - the inevitable return of the Mad Computer Doggy

-||__/
.|+-~
.|| ||
13 Jul 2005, 13:24
Eoin

Joined: 16 Jun 2003
Posts: 68
Location: Ireland
Eoin
Don't mean to spoil all the fun but infinity isn't = x/0 where x is anything, division by zero is simply undefined.

Instead one way of thinking of infinity is the limit as x tends to 0 of 1/x .

But enough 'proper' maths, if you want to find a binary or integer representation of infinity you need to find a value, INF, such that INF + Any number = INF.
13 Jul 2005, 16:55
vid
Verbosity in development

Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
Eoin: just like 0-bit variables we all use
13 Jul 2005, 17:43
pelaillo
Missing in inaction

Joined: 19 Jun 2003
Posts: 878
Location: Colombia
pelaillo
so :
Code:
```find_infinity:
mov edx,eax
inc eax
cmp eax,edx
je  infinity_found
jmp find_infinity
infinity_found:
```
13 Jul 2005, 17:53
smiddy

Joined: 31 Oct 2004
Posts: 559
smiddy
pelaillo wrote:
so :
Code:
```find_infinity:
mov edx,eax
inc eax
cmp eax,edx
je  infinity_found
jmp find_infinity
infinity_found:
```

Yes, exactly...but I wouldn't wait around for an answer.

@Eoin,

Isn't that what I said several posts ago ...but not in the same semantics.
13 Jul 2005, 19:51
Eoin

Joined: 16 Jun 2003
Posts: 68
Location: Ireland
Eoin
Yep you had mentioned it earlier alright, I scanned over the thread too quickly and missed it .
13 Jul 2005, 20:05
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

 Jump to: Select a forum Official----------------AssemblyPeripheria General----------------MainDOSWindowsLinuxUnixMenuetOS Specific----------------MacroinstructionsCompiler InternalsIDE DevelopmentOS ConstructionNon-x86 architecturesHigh Level LanguagesProgramming Language DesignProjects and IdeasExamples and Tutorials Other----------------FeedbackHeapTest Area
Goto page Previous  1, 2

Forum Rules:
 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou can attach files in this forumYou can download files in this forum