Complex number functions for std.math

Don Clugston dac at nospam.com.au
Mon Apr 10 02:16:53 PDT 2006


Anders F Björklund wrote:
> Don Clugston wrote:
> 
>> I completely agree with Walter that 'extended' was a dreadful name for 
>> 80 bit floats. I really like 'real'. But since it's not a fixed size, 
>> it's behaving exactly like an alias. It would be natural to have 
>> corresponding aliases for 'imaginary' and 'complex'.
> 
> "extended" is the name of the FP format, though ? But maybe it needed a 
> spiffier name, like "ext" (just like "quadruple" is shortened to "quad")
> 
> And "extended" isn't that much worse than "long double", is it... ? :-)

IMHO, it is much worse. It has absolutely no indication that it's a 
floating-point number. The full name is "extended precision float".
"double" has a very long history in C-related languages. Extended doesn't.

I think it doesn't matter much what it is called. It should almost never 
appear in code. (Code that uses it is CPU-specific, so some low-level 
library code like isfinite() will use it, but not much else). User code 
should almost always use "real".

(Arguably, they could even be called float80_80 for Windows, float80_96 
for Linux32, float80_128 for Linux64, because of the differences in 
padding. The Linux64 format is binary compatible with the IEEE quadruple 
format; it behaves identically to a quad where the precision has been 
set low).



More information about the Digitalmars-d mailing list