I had a link somewhere to a site that showed how to compute magic numbers but I can't seem to find it.
I want to compute some 64 bit multipliers, e.g. for 1.0e-20, but am having a senior moment.
Anyone have the link to the site that explains this?
it is easy to calculate
just look for Raymonds posts - lol
give me a minute i will see if i can find it...
look at Raymonds post in this thread...
http://www.masm32.com/board/index.php?topic=5821.0
also, i found a pdf that has some ideas that extend the method...
http://www.masm32.com/board/index.php?topic=11741.0
EDIT
notice that Raymond increments the magic number
Hi Dave-
Thanks, but not exactly what I was looking for.
I know how to do a simple inverse (although, not in 64-bit yet).
I just seem to remember a site that explained the optimum combo of multiply and shift.
I never thought getting old would be this much hassle mentally.
read about it in Agner Fogs optimization manual ( also look in AMD-optimization manual ).
or use qWord's utility:
http://www.masm32.com/board/index.php?topic=9937.msg72815#msg72815
Excellent, thank you Drizz.