'half' floating point type

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

    'half' floating point type

    Hello,

    Has anyone heard of the 'half' floating point type. That would be a
    16bits floating point, see for example:



    Has anyone seen this type implemented in a C/C++ compiler ?

    Thanks
    -Mathieu
    Ps: as far as I understand it could also be called 's10e5', or even
    fp16...
  • Walter Roberson

    #2
    Re: 'half' floating point type

    In article <24c5eed9-734c-4dc3-bee2-325f0ab66921@m7 3g2000hsh.googl egroups.com>,
    mathieu <mathieu.malate rre@gmail.comwr ote:
    Has anyone heard of the 'half' floating point type. That would be a
    >16bits floating point, see for example:
    I've -heard- of such things, long ago and far away, but I don't believe
    I ever worked with them.

    The surprisingly detailed list of historical floating point formats
    at http://www.quadibloc.com/comp/cp0201.htm does not
    reveal any 16 bit formats, except -possibly- the Stanford S-1 (the
    wording is unclear in that regard.)
    --
    "The study of error is not only in the highest degree
    prophylatic, but it serves as a stimulating introduction to the
    study of truth." -- Walter Lipmann

    Comment

    • Dann Corbit

      #3
      Re: 'half' floating point type

      "Walter Roberson" <roberson@ibd.n rc-cnrc.gc.cawrote in message
      news:fuloa1$cts $1@canopus.cc.u manitoba.ca...
      In article
      <24c5eed9-734c-4dc3-bee2-325f0ab66921@m7 3g2000hsh.googl egroups.com>,
      mathieu <mathieu.malate rre@gmail.comwr ote:
      >
      > Has anyone heard of the 'half' floating point type. That would be a
      >>16bits floating point, see for example:
      >
      I've -heard- of such things, long ago and far away, but I don't believe
      I ever worked with them.
      >
      The surprisingly detailed list of historical floating point formats
      at http://www.quadibloc.com/comp/cp0201.htm does not
      reveal any 16 bit formats, except -possibly- the Stanford S-1 (the
      wording is unclear in that regard.)
      Half float pixel is a hardware floating point option for OpenGL graphics
      interfaces:


      You inquire on the device with OpenGL to see if the interface is supported
      (e.g. my Nvidia card supports it). The half float size has no value unless
      there is hardware support for it, since float will be about the same speed
      and packing and unpacking the little 16-bit buggers and doing your own
      software math with them would defeat the whole purpose without hardware
      support.


      ** Posted from http://www.teranews.com **

      Comment

      • robertwessel2@yahoo.com

        #4
        Re: 'half' floating point type

        On Apr 22, 5:46 pm, "Dann Corbit" <dcor...@connx. comwrote:
         The half float size has no value unless
        there is hardware support for it, since float will be about the same speed
        and packing and unpacking the little 16-bit buggers and doing your own
        software math with them would defeat the whole purpose without hardware
        support.

        Unless, of course, you have to store a whole lot of them, and you find
        the precision and speed to size tradeoff to be worthwhile. And since
        the OP didn't specify his performance requirements...

        OTOH, in response to the OP's question, any such type would have to be
        supported as an extension, it could not be one of the standard types.
        In C++ you could create a half_float class easily enough, you’d need
        to do little more than supply conversion operators.

        Comment

        • CBFalconer

          #5
          Re: 'half' floating point type

          mathieu wrote:
          >
          Has anyone heard of the 'half' floating point type. That would be
          a 16bits floating point, see for example:
          >

          >
          Has anyone seen this type implemented in a C/C++ compiler ?
          >
          Ps: as far as I understand it could also be called 's10e5', or
          even fp16...
          I published such a system in Dr Dobbs Journal in 1979. See:

          DDJ, March 1979, p.4 and April 1979, p.16

          complete with full arithmetic functions, i.e. trig, exponential,
          logs, etc. Written in assembly.

          --
          [mail]: Chuck F (cbfalconer at maineline dot net)
          [page]: <http://cbfalconer.home .att.net>
          Try the download section.


          ** Posted from http://www.teranews.com **

          Comment

          Working...