Open ssowonny opened 8 years ago
The code you refer to is not unnecessary. The purpose it serves is to execute the second statement only if the first returns true, so that the who expression is truthy.
See here for a running example.
The reason for having that tidbit there is to exploit the symmetry of the error-function so that only values for qn <= 0.5 need to be computed.
But the updated value doesn't effect the final value. Even if the first statement is true, the w3 value is same.
2016년 3월 3일 (목) 오후 10:07, Vaibhav Yenamandra notifications@github.com님이 작성:
The code you refer to is not unnecessary. The purpose it serves is to execute the second statement only if the first returns true, so that the who expression is truthy.
See here http://ideone.com/c3D6Ki for a running example.
The reason for having that tidbit there is to exploit the symmetry of the error-function so that only values for qn <= 0.5 need to be computed.
— Reply to this email directly or view it on GitHub https://github.com/clbustos/distribution/pull/22#issuecomment-191753617.
Ah, my bad there. w3 is defined as a function of w1*(1-w1), so updating w1 to be < 0.5 wont matter as such. So you're right
With that in mind, thanks for noting this @ssowonny!
The Sciruby files also suffer from this issue, I think its better to post this there for completeness. Since the Sciruby fork is ahead in terms of commits & functionality.
I posted it on the repository. Thanks :wink:
I don't think this line is required. Or please let me know if I miss something.