Sometimes invCompleteBeta is stuck in the loop #12

Closed
Shimuuar opened this Issue Sep 16, 2012 · 1 comment

Comments

Projects
None yet
1 participant
@Shimuuar
Collaborator

Shimuuar commented Sep 16, 2012

For small fraction of inputs (~3e-4) equation solver get stuck in the infinite loop. It's broken by limiting number of iterations but it results in poor precision 1e-9 vs 1e-15-1e-14 in normal case

@Shimuuar

This comment has been minimized.

Show comment Hide comment
@Shimuuar

Shimuuar Jan 12, 2013

Collaborator

Not a bug. It's artifact of floating point numbers discreteness. It's possible to alter convergence criteria but it's difficult to get right and doesn't worth it.Also it doesn't lead to bad precision these endless iterations change only last few digits.

Results with bad precision arise because of shape on incomplete beta for small a and/or b. Derivative becomes huge near 0 and/or 1 and consequently precision suffer.

Collaborator

Shimuuar commented Jan 12, 2013

Not a bug. It's artifact of floating point numbers discreteness. It's possible to alter convergence criteria but it's difficult to get right and doesn't worth it.Also it doesn't lead to bad precision these endless iterations change only last few digits.

Results with bad precision arise because of shape on incomplete beta for small a and/or b. Derivative becomes huge near 0 and/or 1 and consequently precision suffer.

@Shimuuar Shimuuar closed this Jan 12, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment