Page 2 of 2

Re: Multiplication

Posted: Mon Apr 03, 2023 8:59 pm
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.