<br><font size=2 face="sans-serif">I agree that "_Real" is redundant
and would not be welcomed by most programmers. Also C TR1 already
defines the decimal types as _DecimalN and at least IBM and gcc have already
implemented that. There are other options to consider. One
is similar to #3 but without the "_Real":</font>
<br>
<br><font size=2 face="sans-serif">4 _BinaryN</font>
<br><font size=2 face="sans-serif"> _DecimalN</font>
<br><font size=2 face="sans-serif"> _Complex_BinaryN</font>
<br><font size=2 face="sans-serif"> _Complex_DecimalN</font>
<br><font size=2 face="sans-serif"> _Imaginary_BinaryN</font>
<br><font size=2 face="sans-serif"> _Imaginary_DecimalN</font>
<br>
<br><font size=2 face="sans-serif">You can divide this into orthogonol
decisions:</font>
<br><font size=2 face="sans-serif"> 1.
Do we use _Binary or _Float ?</font>
<br><font size=2 face="sans-serif"> 2.
Do we use _Real or omit it ?</font>
<br><font size=2 face="sans-serif"> 3.
Do we put _Complex and _Imaginary first or last, or do we omit _Binary
or _Float when used with _Complex and _Imaginary ? (a 3 way choice)</font>
<br><font size=2 face="sans-serif">which means there are 8 combinations.</font>
<br>
<br><font size=2 face="sans-serif">My preferences (subject to change after
discussion) are:</font>
<br><font size=2 face="sans-serif"> 1.
Undecided, leaning towards _Float.</font>
<br><font size=2 face="sans-serif">
I prefer _Binary because while _Float feels
more C-like, it could be confusing that _Float64 and _Float128 don't match
the precision of the typical float.</font>
<br><font size=2 face="sans-serif">
I prefer _Binary because it matches IEEE better.</font>
<br><font size=2 face="sans-serif">
I prefer _Float because _Binary doesn't imply
floating point as well as _Float does.</font>
<br><font size=2 face="sans-serif">
Some might prefer _Float because it's one
character shorter. I don't care about one character.</font>
<br><font size=2 face="sans-serif"> 2.
Omit it.</font>
<br><font size=2 face="sans-serif">
_Real is redundant, would not be welcomed
by most programmers, and TR1 already defines the decimal types as _DecimalN.</font>
<br><font size=2 face="sans-serif"> 3.
_Complex and _Imaginary first.</font>
<br><font size=2 face="sans-serif">
Adjectives normally precede nouns, and I think
of Complex and Imaginary as adjectives, and _Float, _Binary and _Decimal
as being closer by usage to being nouns.</font>
<br><font size=2 face="sans-serif">
A C++ implementation using templates would
have to use Complex <_BinaryN> not _BinaryN <Complex>, etc.,</font>
<br><font size=2 face="sans-serif">
because the template parameter must be an
existing type and the template name must not be..</font>
<br><font size=2 face="sans-serif">
I think complex and imaginary are uncommon
enough that consistency wins over brevity.</font>
<br>
<br><font size=2 face="sans-serif">That leads me to choice #6 (or maybe
#10) of the 12 possible:</font>
<br>
<br><font size=2 face="sans-serif"><b>6 _FloatN</b></font>
<br><font size=2 face="sans-serif"><b> _DecimalN</b></font>
<br><font size=2 face="sans-serif"><b> _Complex_FloatN</b></font>
<br><font size=2 face="sans-serif"><b> _Complex_DecimalN</b></font>
<br><font size=2 face="sans-serif"><b> _Imaginary_FloatN</b></font>
<br><font size=2 face="sans-serif"><b> _Imaginary_DecimalN</b></font>
<br>
<br><font size=2 face="sans-serif">10 _FloatN</font>
<br><font size=2 face="sans-serif"> _DecimalN</font>
<br><font size=2 face="sans-serif"> _ComplexN</font>
<br><font size=2 face="sans-serif"> _Complex_DecimalN</font>
<br><font size=2 face="sans-serif"> _ImaginaryN</font>
<br><font size=2 face="sans-serif"> _Imaginary_DecimalN</font>
<br>
<br><font size=2 face="sans-serif">Yes, I omitted the other 6 types. That's
an exercise for somebody who prefers one of them. 8<)</font>
<br>
<br><font size=2 face="sans-serif">- Ian McIntosh
IBM Canada Lab Compiler Back End
Support and Development<br>
</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">From:</font>
<td><font size=1 face="sans-serif">Jim Thomas <jwthomas@cup.hp.com></font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">To:</font>
<td><font size=1 face="sans-serif">"cfp-interest@ucbtest.org"
<cfp-interest@ucbtest.org></font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Date:</font>
<td><font size=1 face="sans-serif">02/02/2010 11:55 AM</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Subject:</font>
<td><font size=1 face="sans-serif">[Cfp-interest] format - type names issue</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Sent by:</font>
<td><font size=1 face="sans-serif">cfp-interest-bounces@oakapple.net</font></table>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2> >> Issue: What type names to use? Alternatives:<br>
>><br>
>> 1 _BinaryN<br>
>> _DecimalN<br>
>> _BinaryN_Complex<br>
>> _DecimalN_Complex<br>
>> _BinaryN_Imaginary<br>
>> _DecimalN_Imaginary<br>
>><br>
>> 2 _FloatN<br>
>> _DecimalN<br>
>> _FloatN_Complex<br>
>> _DecimalN_Complex<br>
>> _FloatN_Imaginary<br>
>> _DecimalN_Imaginary<br>
>><br>
>> 3 _Real_BinaryN<br>
>> _Real_DecimalN<br>
>> _Complex_BinaryN<br>
>> _Complex_DecimalN<br>
>> _Imaginary_BinaryN<br>
>> _Imaginary_DecimalN<br>
<br>
1 and 2 are more in the style of the existing C floating types. C <br>
doesn't qualify the names of floating types with "real". It's
just float,<br>
not "real float" or "float real". The imaginary and
complex types can be <br>
thought of as constructed from their corresponding real types, so it <br>
makes sense to explicitly name the domain for imaginary and complex but
<br>
not for real. I'm unaware of any confusion caused by this naming approach.<br>
<br>
99.9[...]% of programs and programmers will deal only with real types.
<br>
Programmers wouldn't thank us for lengthening the names of the real <br>
types (as with 3):<br>
<br>
_Real_Binary256 fmab256 (_Real_Binary256, _Real_Binary256, _Real_Binary256);<br>
<br>
vs<br>
<br>
_Float256 fmaf256 (_Float256, _Float256, _Float256);<br>
<br>
3 is inconsistent with the existing C decimal FP TR (_Real_DecimalN vs
<br>
_DecimalN). This would mean that current implementations of the TR would
<br>
need to support two naming schemes for their decimal floating types.<br>
<br>
_FloatN is easily thought of as the binary floating type of width N. The
<br>
existing C float type must be binary for Annex F (IEEE) implementations
<br>
and is binary in almost all implementations. Existing implementations <br>
(including gcc) currently use __floatN to designate binary floating <br>
types (__float80, __float128). I'm unaware of any C history that would
<br>
associate _BinaryN with floating point.<br>
<br>
I think this argues that 2 is the best choice.<br>
<br>
-Jim<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Cfp-interest mailing list<br>
Cfp-interest@oakapple.net<br>
</font></tt><a href="http://mailman.oakapple.net/mailman/listinfo/cfp-interest"><tt><font size=2>http://mailman.oakapple.net/mailman/listinfo/cfp-interest</font></tt></a><tt><font size=2><br>
</font></tt>
<br>
<br>