need for binary floats (except performance)?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kartik

    #1

    need for binary floats (except performance)?

    Since the Decimal type can represent any given fractional number
    exactly, including all IEEE binary floating-point numbers, wouldn't it
    be advisable to use Decimals for all floating point numbers (except
    possibly for performance)?

    Thanks, Kartik.
  • Paul Rubin

    #2
    Re: need for binary floats (except performance)?

    kartik_vad@yaho o.com (kartik) writes:[color=blue]
    > Since the Decimal type can represent any given fractional number
    > exactly,[/color]

    It can't. For example, it can't represent 1/3 exactly.
    [color=blue]
    > including all IEEE binary floating-point numbers, wouldn't it be
    > advisable to use Decimals for all floating point numbers (except
    > possibly for performance)?[/color]

    The notion has some appeal, though algorithms on binary floats have
    been studied a lot over the past several decades, while decimal floats
    are not used very much at the moment. It will get more interesting
    if and when we start seeing decimal floating point hardware again.

    Comment

    • Grant Edwards

      #3
      Re: need for binary floats (except performance)?

      On 2005-02-01, kartik <kartik_vad@yah oo.com> wrote:
      [color=blue]
      > Since the Decimal type can represent any given fractional number
      > exactly, including all IEEE binary floating-point numbers, wouldn't it
      > be advisable to use Decimals for all floating point numbers (except
      > possibly for performance)?[/color]

      That's a pretty huge "except" for some applications.

      --
      Grant Edwards grante Yow! HUGH BEAUMONT died
      at in 1982!!
      visi.com

      Comment

      Working...