Path: csiph.com!weretis.net!feeder8.news.weretis.net!newsfeed.bofh.team!paganini.bofh.team!not-for-mail From: R Daneel Olivaw Newsgroups: comp.sys.unisys Subject: Re: 1100 Multiply and Divide Fractional Instructions Date: Mon, 9 Mar 2026 19:47:32 +0100 Organization: To protect and to server Message-ID: <10on4k4$8qs6$1@paganini.bofh.team> References: <10ni12j$35m16$1@dont-email.me> <10ni2bu$3r962$1@paganini.bofh.team> <10ni9oh$38us1$1@dont-email.me> <10nid8b$3rvce$1@paganini.bofh.team> <10on3jj$3idtt$1@dont-email.me> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Mon, 9 Mar 2026 18:47:32 -0000 (UTC) Injection-Info: paganini.bofh.team; logging-data="289670"; posting-host="XBJBjenliTep7OIZ0g9xdw.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA+yjdR4A"; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 SeaMonkey/2.53.23 X-Notice: Filtered by postfilter v. 0.9.3 Xref: csiph.com comp.sys.unisys:2603 Stephen Boyd wrote: > On 2/23/26 15:27, R Daneel Olivaw wrote: >> Stephen Boyd wrote: >>> On 2/23/26 12:22, R Daneel Olivaw wrote: >>>> >>>> Look at the code FTN generates when converting REAL to INTEGER (or >>>> vice versa), it makes use of something along those lines.  You can >>>> then check the equivalent for Double Precision. >>>> I had to do this for a piece of MASM coding around 41 years ago so >>>> my memory of the exact code generated is more than sketchy. >>> >>> Ah! I can kind of see where that would be useful in that situation. >>> Not being a mathematician I would have to do some serious thinking to >>> completely wrap my head around it. >>> >>> Whenever I have to convert between floating point and integer or vice >>> versa I usually end up doing a bunch of floating point arithmetic to >>> make it happen. I can see where being able to use integer >>> instructions would be a lot faster. >>> >>> Thanks >>> >> >> Well I cheated back then - "FTN has to do it and whatever it does will >> be bombproof, so @FTN,L (on a tiny subroutine) is the way to go". >> My comment in the MASM routine became legendary, "I don't know why >> this works but it does so leave it alone". > > I found another use for MF. Converting Fieldata to binary. Like the > Fortran code mentioned above I don't really know why this works but I > tried it and it does. > > Convert the 6 fieldata numerals in A0 to binary in A1. > >         AND     A0,(0171717171717).   STRIP OFF 'ZONE' BITS >         AND     A1,(-0,0,-0,0,-0,0).  EXTRACT ALTERNATE DIGITS >         MF      A2,(54*/29). >         AN      A1,A2.                3 PAIRS OF DIGITS CONVERTED >         AND     A1,(0,-0,0). >         MF      A2,((1*/12-100)*/23). >         AN      A1,A2.                RIGHT 4 DIGITS NOW DONE >         AND     A1,(-0,0,0). >         MF      A2,((1*/24-10000)*/11). >         AN      A1,A2.                DONE. RESULT IN A1, ORIGINAL IN A0. > > I found this at http://fourmilab.org/documents/univac/cute-tricks.html > > Steve B That link is bad, it's cute_tricks and not cute-tricks. Oh, and https. Some of those tricks are really outdated - 13, 14 and 19 in particular (19 assumes non-write-protected I-Banks). Ascii versions of some of the others would be useful.