Movement against float.init being nan

drug007 drug2004 at bk.ru
Tue Aug 23 06:58:44 UTC 2022


On 8/23/22 02:08, claptrap wrote:
> On Monday, 22 August 2022 at 15:56:16 UTC, drug007 wrote:
>> On 8/22/22 18:04, claptrap wrote:
>>> On Sunday, 21 August 2022 at 17:56:58 UTC, drug007 wrote:
>>>> On 8/21/22 20:28, claptrap wrote:
>>>>> On Sunday, 21 August 2022 at 16:51:51 UTC, Walter Bright
>>>>
>>>> It will be noticed but what price? You've initialized all vars to 0 
>>>> so how do you know that this exactly initialization to zero is wrong?
>>>
>>> You dont initialise all variables to zero, Ive just looked at some om 
>>> my code and in 4000 lines i found two default init ints and maybe 50+ 
>>> explicitly initialised. You're just inventing nonsense scenarios.
>>
>> But that is my point - not all variables initialize to zero. It is my 
>> statement that this is nonsense scenarios. Reread the post carefully.
> 
> "You've initialized all vars to 0"
> 
> I can only respond to what you write, (which was a nonsense scenario.)
> 

I'm so sorry, but you failed to reread post above carefully again. My 
point is not all data initialize zero. That is the reason why floating 
point number should be defaulted as NaN. Because you clearly can see 
what data hasn't been initialized at all.

> 
>>> Occasionally you might have to do a bit of mental arithmetic, but not 
>>> often, I'm seriously wondering why you think it's so hard?
>>>
>>
>> Just because I've done math calculations before? And no, I didn't mean 
>> mental arithmetic. I meant numerical matrix operations from inputs to 
>> outputs just to track down where was wrong zero initialization. In 
>> some cases zero initialization is invalid, for example covariance of 
>> random variables. But NaN is invalid always. That is its advantage.
> 
> I've been programming for over 30 years, mostly DSP and some numerical 
> stuff, statistical analysis. My experience is that its not a big deal.
> 

My experience is it is a big deal enough.

> My point is people are massively overselling how much of a problem bad 
> inits are to track down.


More information about the Digitalmars-d mailing list