flat assembler
Message board for the users of flat assembler.

Index > Heap > Stupid assembly math :-D

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
THEWizardGenius



Joined: 14 Jan 2005
Posts: 382
Location: California, USA
THEWizardGenius
Wow, I'm brilliant! Very Happy 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!
Post 13 Jul 2005, 00:26
View user's profile Send private message AIM Address Reply with quote
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. Laughing
Post 13 Jul 2005, 02:40
View user's profile Send private message Reply with quote
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 Smile
Post 13 Jul 2005, 07:26
View user's profile Send private message Visit poster's website Reply with quote
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!) Smile
Post 13 Jul 2005, 10:03
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
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 Smile


Sorry, I suppose I should have edited it when it was pointed out by vid. It won't happen again, ok? Embarassed
Post 13 Jul 2005, 11:32
View user's profile Send private message Reply with quote
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 Cool ! 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

-||__/
.|+-~
.|| ||
Post 13 Jul 2005, 13:24
View user's profile Send private message Reply with quote
Eoin



Joined: 16 Jun 2003
Posts: 68
Location: Ireland
Eoin
Don't mean to spoil all the fun Very Happy 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 Cool .

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.
Post 13 Jul 2005, 16:55
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
Eoin: just like 0-bit variables we all use
Post 13 Jul 2005, 17:43
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
pelaillo
Missing in inaction


Joined: 19 Jun 2003
Posts: 878
Location: Colombia
pelaillo
so Laughing :
Code:
find_infinity:
  mov edx,eax
  inc eax
  cmp eax,edx
  je  infinity_found
  jmp find_infinity
infinity_found:
    
Post 13 Jul 2005, 17:53
View user's profile Send private message Yahoo Messenger Reply with quote
smiddy



Joined: 31 Oct 2004
Posts: 559
smiddy
pelaillo wrote:
so Laughing :
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. Wink

@Eoin,

Isn't that what I said several posts ago Question ...but not in the same semantics.
Post 13 Jul 2005, 19:51
View user's profile Send private message Reply with quote
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 Smile .
Post 13 Jul 2005, 20:05
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.