Skip to content

solved little bug with -nan in modules tab#160

Merged
alkemyst merged 1 commit into
tkLayout:devfrom
ghugo83:reso
Jan 22, 2016
Merged

solved little bug with -nan in modules tab#160
alkemyst merged 1 commit into
tkLayout:devfrom
ghugo83:reso

Conversation

@ghugo83

@ghugo83 ghugo83 commented Jan 21, 2016

Copy link
Copy Markdown
Contributor

No description provided.

@alkemyst

Copy link
Copy Markdown
Contributor

Hi Gabrielle,
I might be wrong, but I have the impression that fabs() is covering a problem there. If I understood things properly, one should never get a negative number under square root , by construction...

@ghugo83

ghugo83 commented Jan 22, 2016

Copy link
Copy Markdown
Contributor Author

Hi Stefano,
Yep sure, but it turned out that (N_Q - S^2) / N^2 (used to approximate sigma^2)
with the notation
N : count
S : sum
Q : sum of squares
can be negative when it aproximates 0 (I got sth like a -10e(-19) instead of 0).
So the abs() avoids this problem.
Of course when (N_Q - S^2) / N^2 approximates a non-null number, i always get sth positive.
Cheers,
Gabrielle

alkemyst added a commit that referenced this pull request Jan 22, 2016
solved little bug with -nan in modules tab
@alkemyst alkemyst merged commit 21d80a8 into tkLayout:dev Jan 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants