Re: A Simplified Number System

From: Tak To (takto_at_alum.mit.edu.-)
Date: 11/02/04


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


Relevant Pages

  • Re: Interesting math
    ... Floating point number represents a real number with 6 digits precision. ... Floating point numbers are denoted by the keyword float. ...
    (alt.usage.english)
  • Re: Gentler Decimal Floating-Point
    ... effectively change the radix of a decimal floating point ... under the heading "Logarithms all the time", ... logarithmic representation of numbers to be made workable for all the ... The middle digits are shifted only when the exponent, ...
    (comp.arch.arithmetic)
  • Re: Linear Algebra Challenge
    ... Since I'm using floating point, so I'll never be able to calculate one ... \<< aeq vals SUBST EVAL vals AXL + AXL 'vals' STO pert vals SUBST ... I switched over to Maxima to avoid the memory problem, ... floating point math set to 99 digits. ...
    (comp.sys.hp48)
  • Re: Floating point subtraction rounding error (NOT display error)
    ... and apparently it's because floating point subtraction is having ... Notice that, to align both numbers at their decimal point, we had to discard the two less significant binary digits of 0.6. ... Note that this is the best result you can get with a limited precision of 53 bits, and it's not even Python who computes the value, but the underlying C math library. ...
    (comp.lang.python)
  • Re: Appoximating large numbers
    ... floating point number will correctly represent the first 15 digits of any ... give you the correct first 30 digits of any 16,000 digit number. ... looks like you're using an interpreted instead of a compiled language, ... I'm not familiar with Ruby ...
    (sci.math.num-analysis)