Re: Assembly Language - Mathematics WITHOUT maths coprocessor
- From: "¬a\\/b" <al@xxx>
- Date: Sat, 08 Oct 2005 19:05:21 +0200
On Sat, 08 Oct 2005 09:43:33 GMT, "Richard Cooper"
<spamandviruses@xxxxxx> wrote:
>On Sat, 08 Oct 2005 02:18:48 -0400, ¬a\/b <al@xxx> wrote:
>
>> i think the division in the book "Handbook of Applied Cryptography"
>> with the base 2^32 is 100x faster than its binary base form
>
>I don't like the way those cryptography people do math. According to
>them, you can solve x = a + b with the following code:
>
> mov eax, [a]
> mov edx, [b]
> or eax, edx
> mov [x], eax
>
>What I think has happened is that they're for some reason against using
>words like "or" and "xor" and so they use "+" and "*" instead. So when
>they say divide, god only knows what they're actually talking about.
>
>Anyway, if you're mearly dividing large numerators by 32-bit or smaller
>denominators, that's actually pretty easy and you can do it with an
>algorithm using the divide instruction, so that you're doing it 32 bits
>per interation instead of 1 bit per interation. However, once the
>denominator exceeds the capabilities of the CPU's divide instruction, I
>don't know what else to do besides shift and subtract.
if the case adjust the result of partial computation (doing -1)
>(Of course that
>doesn't mean that there isn't an easier way, I frequently find that I
>don't know everything. Well, at least on occasion.)
.
- Follow-Ups:
- Re: Assembly Language - Mathematics WITHOUT maths coprocessor
- From: Richard Cooper
- Re: Assembly Language - Mathematics WITHOUT maths coprocessor
- References:
- Re: Assembly Language - Mathematics WITHOUT maths coprocessor
- From: Richard Cooper
- Re: Assembly Language - Mathematics WITHOUT maths coprocessor
- From: ¬a\\/b
- Re: Assembly Language - Mathematics WITHOUT maths coprocessor
- From: Richard Cooper
- Re: Assembly Language - Mathematics WITHOUT maths coprocessor
- Prev by Date: Re: Analog Gamepads
- Next by Date: Re: New to asm world!
- Previous by thread: Re: Assembly Language - Mathematics WITHOUT maths coprocessor
- Next by thread: Re: Assembly Language - Mathematics WITHOUT maths coprocessor
- Index(es):