Re: Decomposing a FLOAT



On 06/05/2012 06:54 AM, Malcolm McLean wrote:
בתאריך יום שני, 4 ביוני 2012 20:20:43 UTC+1, מאת Keith Thompson:

That's a fine idea -- but FLOAT is a lousy name for it.

REAL would be better.
However not all programmers know what that means.

A typedef like that is always intended for use in a specific context; it
should not mean "the floating point type that should be used in all
contexts". It should mean something like "the floating point type to be
used when working with this particular library", and the name should
contain at least a hint of the correct context; neither "FLOAT" nor
"REAL" does so.
--
James Kuyper
.



Relevant Pages

  • Re: prePEP: Decimal data type
    ... a float (the D isn't part of the float syntax in Python, ... > #- context. ... The reason I say that they're rather different is that floating point and ... My personal opinion in the matter is that setting the precision high ...
    (comp.lang.python)
  • Re: weird problem
    ... I already told you that the comparison between an integer and a float ... And now a question about something else: why do you use floating ... use then to copy a float into a char *1. ... binary representation doesn't resemble a string like "123.46343" ...
    (comp.lang.c)
  • Re: Safer of 2 methods for very long doc
    ... I use wrapped objects so seldom that I have to think about how I've handled that when I have used them, and I guess, as you say, I've moved the anchor. ... paragraph and the picture move to the next page. ... in Word the text does not flow from after a 'floating' ... >I'd appreciate knowing how you "float" a table, ...
    (microsoft.public.word.docmanagement)
  • Re: Efficient Floating Point Compression?!
    ... Want pack and unpack huge masses of Floating Point Numbers. ... lossy or losslessly?... ... it is also possible to develop a custom representation for said floats, for example, via huffman coding the exponent, and maybe higher-order bits of the mantissa. ... a slight possible hack could be remembering whatever byte followed each byte "last time", and then pull that byte to the front in the next context, which in some cases could help with the ratios, but this may not be worth the extra overhead. ...
    (comp.compression)
  • Re: weird problem
    ... You don't show the typedef you ... need when printing a float or double value out in ASCII good for? ... print out a human-readable string for what errno is set to. ... collisions is int and defined as a global. ...
    (comp.lang.c)