flat assembler
Message board for the users of flat assembler.
Index
> Heap > Stupid assembly math :D Goto page Previous 1, 2 
Author 

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
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
Lucky you WE were lazy to write them all, we just wrote some first 2030 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
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
Well, finding out what infinity actually looks like with general purpose integer math is quiet hard, but hopefully, the x87 FPU has buildin 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
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
Eoin: just like 0bit variables we all use


13 Jul 2005, 17:43 

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
pelaillo wrote: so : 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
Yep you had mentioned it earlier alright, I scanned over the thread too quickly and missed it .


13 Jul 2005, 20:05 

Goto page Previous 1, 2 < Last Thread  Next Thread > 
Forum Rules:

Copyright © 19992020, Tomasz Grysztar. Also on YouTube, Twitter.
Website powered by rwasa.