(42, all flavours) Integer Division - how?
|
01-08-2021, 05:24 PM
Post: #60
|
|||
|
|||
RE: (42, all flavours) Integer Division - how?
(12-20-2020 03:22 AM)Albert Chan Wrote: DIV code, using REM. It work with signed arguments, both a and b. The latest Free42 Windows version (2.5.23, 1/6/2021) now has FMA. Thank you. Thomas Okken PI PI PI X^2 +/- XEQ "FMA" → -1.37075656833106266883964580072991e-34 FMA based DIV behave the same as my REM based DIV. Code: 00 { 36-Byte Prgm } Note: (a-b*q)/b = (sign(b)*a - |b|*q) / |b| In other words, DIV(a,b) = DIV(sign(b)*a, |b|) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)