Other notes

Bill Baxter dnewsgroup at billbaxter.com
Sat Nov 24 15:52:48 PST 2007


BCS wrote:
> Reply to Bill,
> 
>> BCS wrote:
>>
>>> Reply to bearophile,
>>>
>>>> 4) Every language feature adds complexity to the compiler, makes the
>>>> language manual longer, requires programmers to remember more
>>>> things, etc. So every language feature has to be kept only if enough
>>>> people use it, without a good way to replace it, etc. I like D real
>>>> type, but so far I have't found a situation where double can't solve
>>>> my problem. So who of you is using the real type? If there isn't
>>>> enough people using it then it may be removed from the D specs.
>>>>
>>> I only use real. On most, if not all, systems it's just as fast as
>>> double (OK it needs more IO time but...) so why not use it?
>>>
>> You answered the question right there.  More memory means occupies
>> more cache, more disk etc.  I basically only use real for intermediate
>> temporaries where I might want to keep a little more precision.
>>
> 
> point taken
> 
>> I basically never store reals or pass them between functions. 10 bytes
>> is kind of a weird size for alignment-sensitive things too.
>>
> 
> I use it for parameters and return values, I would only downsize to 
> double if I'm storing a lot of them. In my cases, my programs tend to be 
> computationally heavy but not very data heavy. Having a few hundred 
> values around at any one time would be unusual.
> 
>> But I don't think it needs to be removed from the specs.  It's neat
>> you can get at it when you need it.
>>
>> --bb
>>
> 
> 

I should also say that A) though I know more than the average Joe about 
it, I'm by no means an expert on numerical computing. B) my applications 
are mostly graphics-oriented so a little roundoff is rarely of concern 
to me.  The "eyball norm" is the only error norm that matters for most 
of what I do.

--bb



More information about the Digitalmars-d mailing list