News:

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

Percentages for the mathematically challenged ...

Started by James Ladd, May 22, 2005, 02:03:22 AM

Previous topic - Next topic

Merrick

Why be artificially stuck to the number 100 and use expensive mul's and div's?

Shift the original left by several bits (how many bits depends on the accuracy you want), do the *one* mul, then the add, then shift right by the number of bits you shifted left. It's faster. Less mul's, no div's, better, faster code.