Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!uw-beaver!tektronix!tekcrl!tekfdi!videovax!stever From: stever@videovax.Tek.COM (Steven E. Rice, P.E.) Newsgroups: comp.sys.amiga Subject: Re: Questions about M68881 FPU Message-ID: <4586@videovax.Tek.COM> Date: Mon, 21-Sep-87 13:05:32 EDT Article-I.D.: videovax.4586 Posted: Mon Sep 21 13:05:32 1987 Date-Received: Wed, 23-Sep-87 04:37:32 EDT References: <8709180202.AA07941@cory.Berkeley.EDU> Reply-To: stever@videovax.Tek.COM (Steven E. Rice, P.E.) Organization: Tektronix Television Systems, Beaverton, Oregon Lines: 44 In article <8709180202.AA07941@cory.Berkeley.EDU>, Matt Dillon (dillon@CORY.BERKELEY.EDU) writes: >> - What is the form of BCD floating point? MC68881 Packed Decimal Real format ---------------------------------- 91 80 67 0 --------------------------------------------------------------------------- | | | | | | | | | | | | | | | | | | | | | | | | | |S|S|*2| 3-digit|Zero**| | | | | | | 17-digit | | | | | | | | |M|E| |Exponent| | | | | | | | Mantissa | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --------------------------------------------------------------------------- ^ |_ Implicit decimal point SM = Sign of the Mantissa SE = Sign of the Exponent *2 = Two bits used only for +/- infinity and NANs; zero otherwise Zero** = Zero unless a binary-to-decimal conversion overflow occurs This is from the _MC68881 Floating-Point Coprocessor User's Manual_, First Edition, Motorola (1985). >> - How would you convert from floating point to ASCII and back? > > No specifics. Assuming you have the IEEE floating point format > reference it would be a simple matter to write a small subroutine > to do it. The question seems slightly out of place. Conversion between ASCII and Packed Decimal Real is pretty trivial. The 68881 has the ability to convert between integer and IEEE Floating Point formats and the Packed Decimal Real format. The key is that the 68881 is *FAST*. (Presumably, the math library that came with the board also has a conversion routine. . .) Steve Rice ----------------------------------------------------------------------------- new: stever@videovax.tv.Tek.com old: {decvax | hplabs | ihnp4 | uw-beaver | cae780}!tektronix!videovax!stever