News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Does this sound right to you?

Started by TomRiddle, January 28, 2007, 05:29:34 PM

Previous topic - Next topic

TomRiddle

QuoteThe instructions you need for multiplication are DIV and IDIV for integer multiply and there are FP instructions if you require FP precision.

u

Please use a smaller graphic in your signature.

TomRiddle


BogdanOntanu

I guess he wanted to say MUL and IMUL but then again he might have wanted to make you think about it...
Who can tell?
Ambition is a lame excuse for the ones not brave enough to be lazy.
http://www.oby.ro

Ratch

TomRiddle,

     DIV is for unsigned number division.  IDIV is for signed number division.  FP instructions are for floating point numbers.  FP's are not a precision specification.  Ratch

hutch--

I think I would stand by the post in the old link.

Quote
The instructions you need for multiplication are DIV and IDIV for integer multiply and there are FP instructions if you require FP precision. Every member here has had to learn the instructions so its not like you are the only one and if you make te effort, members will help you but if I see one more posting that is ALL CAPITALS I will delete it and if you persist with this style of posting your membership will be removed as well.

I doubt there is any argument that FP can improve on integer precision.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

raymond

I normally avoid getting into such arguments. However, this one may need clarification.

The FPU has a very defined maximum limit on its precision, i.e. 64 bits which is equivalent to some 19 significant digits in the decimal system. Technically, integer operations could be handled with unlimited precision, even though only 32-bit registers may be available. For example, I have a small program which can extract the square root of any number with a precision of up to 10,000 significant fractional digits.

The main advantage of the FPU and FP instructions is the ability to easily handle a wide range of numbers from as small as 10-4932 to as large as 104932 (but always with a limit of 64 bits of precision). It's also a lot easier and faster to use the FP instructions when handling irrational fractional numbers, trigonometric functions, logarithms, etc. etc., when the provided precision is adequate for the purpose.

Raymond
When you assume something, you risk being wrong half the time
http://www.ray.masmcode.com

hutch--

Ray,

I think you are referring to BCD rather than the integer division operators which are bound by integer precision. I take your point that BCD is effectively unlimited but its doing more than DIV or IDIV.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php