Re: short float ???



On July 1, 2009 11:01, in comp.std.c, Giacomo Catenazzi (cate@xxxxxxxxxx)
wrote:

jacob navia wrote:
Hi

In a previous message I asked this question but it got swamped by the
discussion about vector extensions (that has degenerated into
discussions about everything else, as it happens when the people in
comp.lang.c come into play)

Specifically I want to suggest that we use the combination of

short float

to describe a floating point data type of half precision (16 bits)

This format is used in the NVIDIA graphic cards and will be available
in the x86 instruction set beginning 2010.

16-bit for a floats seems too small.
Could you give us the precision, the range and expected use
of such floats?

My concern are about the use:
- speed: but in this case C will use double precision calculations,
thus removing the speed advantage
- size: (to store huge amount of data).

The second one requires very few changes in C, but the first one
(which I think it is the intention) give big problem to C
language.

I have similar questions that I'd like Jacob to address.

Jacob: you mention that "this format is used in the NVIDIA graphic cards,
and will be available in the x86 instruction set beginning 2010".

1) /Which/ format is "this format"? Is the floatingpoint format used in
NVIDIA cards the /same/ format as will be available in the x86
instructionset? What about other GPUs and processors that support a "short
floatingpoint" format natively?

2) Although those specific platforms are fairly popular, they do not make up
the entirety of the C platform universe. Can you expand on why a "short
floatingpoint" format tailored to these platforms, rather than, say, a
floatingpoint format tailored to the existing RISC or FPGA/embedded
platforms available now?

3) Do you intend that C perform computations with your proposed "short
float", or will standard promotion rules apply and computations be
performed in "long float" equivalents (after promotion)? If so, then what
benefit does "short float" provide on the platforms you mentioned?

4) In a previous post, you replied (my summary, not your actual words) that
other changes to the C language that would be necessitated by your
proposed "short float" would be trivial. To me, /someone/ has to do the
actual dog-work of detailing those changes, and making a proposal as to
what the standard should say, and that /someone/ should be the person who
makes the initial "short float" proposal that initiated the changes. Are
you prepared to flesh out your proposal, including guidance on how all
those other details should look? If not, then /who/?

--
Lew Pitcher

Master Codewright & JOAT-in-training | Registered Linux User #112576
http://pitcher.digitalfreehold.ca/ | GPG public key available by request
---------- Slackware - Because I know what I'm doing. ------


.



Relevant Pages

  • Re: short float ???
    ... you mention that "this format is used in the NVIDIA graphic cards, ... floatingpoint" format natively? ... we now have two competing hardware definitions for a "short float". ...
    (comp.std.c)
  • Re: short float ???
    ... Jacob: you mention that "this format is used in the NVIDIA graphic cards, ... platforms available now? ... format short float should have. ...
    (comp.std.c)
  • Re: Socket & PrintWriter issue-- writing a float to a C client
    ... memcpy(&flt, buffer, 4); ... such as that a float is represented in C memory as 4 ... bytes in IEEE little-endian format -- in which case something like the above ...
    (comp.lang.java.programmer)
  • Re: CR and LF
    ... what you were getting was if it wasn't on a unix system. ... other platforms in using CRLF to indicate a newline in a text ... format or the other; then write code for that format in a way ...
    (comp.unix.questions)
  • Re: Accounting changes
    ... 32-bit float format. ... This is the C "float" type on all the architectures we support. ... I could add a typedef clarifying this, but I doubt we'll ever support an architecture where float is a different format. ... these features are provided at no cost by the processor hardware and the C library. ...
    (freebsd-arch)

Loading