The exponent was to the power of 16 instead of 2. High order bit is a sign, next 7 bits exponent, excess 64 meaning that high order bit of the 7 is one meaning no shift. The next 24 or 56 bits are mantissa with the hexadecimal point just to the left. The number one would be x'41100000'. The mantissa is 1%16 so the exponent means shift 4 bits to the left. IBM came up with a quadruple precision where the only the last 4 bytes of the second double word were used. Aren't you sorry you asked?
On Tue, Mar 17, 2009 at 5:07 PM, Devon McCormick <[email protected]> wrote: > Didn't IBM mainframes use their own floating-point format? I seem to > recall > that their exponent was a couple of bits shorter so the mantissa could be a > couple of bits longer, so their decimal exponents went from _80 to 79 or > something like that. > > On Tue, Mar 17, 2009 at 6:06 PM, Raul Miller <[email protected]> > wrote: > > > On Tue, Mar 17, 2009 at 5:23 PM, James C Field <[email protected]> > > wrote: > > >> Isn't this why IBM supported Binary Coded Decimal? Floating Point sux > > for money. > > > > Floating point works fine for money unless you represent values as > > fractions. > > > > In other words, scale things properly and you should be fine. > > > > Bad: 1.99 dollars > > Good: 199 cents > > > > That said, if you are representing money values in cents, you can run > > into problems if you deal with values exceeding 45 trillion dollars. > > With inflation, this might become a real problem before too long. > > > > On the other hand, if inflation gets that bad, losing a few pennies here > > and there should be a relatively minor worry. It's not as if they would > > be worth much of anything under those circumstances. > > > > -- > > Raul > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > > -- > Devon McCormick, CFA > ^me^ at acm. > org is my > preferred e-mail > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
