Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!bbn!husc6!encore!pinocchio From: knighten@pinocchio (Bob Knighten) Newsgroups: comp.lang.c Subject: Re: IEEE floating point format Message-ID: <11563@xenna.Encore.COM> Date: 28 Jul 89 18:05:39 GMT References: <2170002@hpldsla.HP.COM> Sender: news@Encore.COM Reply-To: knighten@pinocchio (Bob Knighten) Organization: Encore Computer Corp Lines: 53 In-reply-to: manoj@hpldsla.HP.COM (Manoj Joshi) Single format: Numbers in the single format are composed of three fields: A 1-bit sign S A biased exponent e = exponent + 127 A fraction f = 0.b b ...b 1 2 23 The exponent range is -126 to +127. Exponent = 128 is used to encode +/-infinity and NaNs. Exponent = -127 is used to encode +/-0 and denormalized numbers. The layout is: 1 8 23 width |S| e | f | m l m l order where m stands for most significant bit and l stands for least significant bit Double format: Numbers in the single format are composed of three fields: A 1-bit sign S A biased exponent e = exponent + 1023 A fraction f = 0.b b ...b 1 2 52 The exponent range is -1022 to +1023. Exponent = 1024 is used to encode +/-infinity and NaNs. Exponent = -1023 is used to encode +/-0 and denormalized numbers. The layout is: 1 11 52 width |S| e | f | m l m l order where m stands for most significant bit and l stands for least significant bit The value of a number represented in either of these formats is S exponent x = (-1) * 1.f * 2 -- Bob Knighten Encore Computer Corp. 257 Cedar Hill St. Marlborough, MA 01752 (508) 460-0500 ext. 2626 Internet: knighten@encore.com UUCP: {bu-cs,decvax,necntc,talcott}!encore!knighten