Re: A Simplified Number System
From: Tak To (takto_at_alum.mit.edu.-)
Date: 11/02/04
- Next message: Peter T. Daniels: "Re: Usher's insult to women inside Re: The theory of Mr. Carrasquer"
- Previous message: Tak To: ""m of h", "x for y" (Re: A Simplified Number System)"
- In reply to: Wiktor S.: "Re: A Simplified Number System"
- Next in thread: Sean O'Leathlobhair: "Re: A Simplified Number System"
- Reply: Sean O'Leathlobhair: "Re: A Simplified Number System"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 02 Nov 2004 18:11:34 -0500
Sean wrote:
> What are your "fixed point numbers"? The ones most familiar
> to me are BCD.
Lee Sau Dan wrote:
> Fixed point is as opposed to floating point. Recall that a floating
> point number consists of 2 (signed) parts: mantissa and exponent.
> With fixed point, I mean the exponent is always fixed. So, you only
> need to store the mantissa. The exponent is implicit. You would of
> course use exponents that are (negative) powers of 10 for financial
> applications. A reasonable way to represent the mantissa in binary is
> to use 2's complement form.
Wiktor S. wrote:
> It's like keeping all prices in cents instead of dollars and it's
> fractions (or whatever currencies you use). I think it's the best
> solution. Normal integers and normal arithmetics. You only need to
> display them correctly. No weird BCD, no special structures.
In some programming languages such as PL/1, one can declare fixed
point numbers as, for example, FIXED(5,2), meaning a precision of
5 (decimal) digits for the integral part, 2 digits for the fraction
part. The compiler would then do all the converion for you.
Tak
--
----------------------------------------------------------------+-----
Tak To takto@alum.mit.eduxx
--------------------------------------------------------------------^^
[taode takto ~{LU5B~}] NB: trim the xx to get my real email addr
- Next message: Peter T. Daniels: "Re: Usher's insult to women inside Re: The theory of Mr. Carrasquer"
- Previous message: Tak To: ""m of h", "x for y" (Re: A Simplified Number System)"
- In reply to: Wiktor S.: "Re: A Simplified Number System"
- Next in thread: Sean O'Leathlobhair: "Re: A Simplified Number System"
- Reply: Sean O'Leathlobhair: "Re: A Simplified Number System"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|