Multiplication

Anything QL Software or Programming Related.
User avatar
tofro
Font of All Knowledge
Posts: 2702
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Multiplication

Post by tofro »

Pr0f wrote: Mon Apr 03, 2023 6:50 pm was just wondering how these routines compare against the maths co processors (I know this is/was not offered directly on the old QL ) in terms of speed and code efficiency (space used)
Simple: Not at all. The 68881/2 FPUs don't know quad words (Motorola expression for 64-bit integers). You could convert the arguments into the floating point domain, do an FMUL there and then convert back (with loss of precision, probably).

Don't look that far: Starting with the 68020, the M68k CPUs support a MULS.L operation which does exactly what is asked for: 32x32=64 bits multiplication - With just a slight increase in used cycles over the plain 68000.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Post Reply