float init 0 request
claptrap
clap at trap.com
Fri Aug 21 21:16:20 UTC 2026
On Thursday, 20 August 2026 at 03:39:52 UTC, Walter Bright wrote:
> On 8/15/2026 3:07 AM, claptrap wrote:
>> You need to stop acting like it's foolproof, it's really not.
>
> You are correct that it is not foolproof, but it is far better
> than 0, because the error is far more likely to be detected.
And that's great if it's a one to one trade off. But what if nine
times out of ten zero was the correct initial value? So you end
up with this...
1 bug that is harder to detect? Nine correctly init to 0, and one
wrongly.
or
10 bugs that are easier to detect? Ten init to NaN.
That's the **actual** tradeoff here.
More information about the Digitalmars-d
mailing list