ntamas / plfit

Fitting power-law distributions to empirical data, according to the method of Clauset, Shalizi and Newman
GNU General Public License v2.0
47 stars 17 forks source link

import and incorporate the lnhzeta family functions #17

Closed jgmbenoit closed 6 years ago

jgmbenoit commented 6 years ago

in view to fix the underflow issue #13 . The underflow issue is fixed. Note that the function plfit_i_ks_test_discrete must be certainly revisited.

ntamas commented 6 years ago

Thanks a lot! I'll check the plfit_i_ks_test_discrete part.

ntamas commented 6 years ago

The math seems to check out for me in the new version of plfit_i_ks_test_discrete; I will probably add a comment about all the magic going on there, but otherwise it seems to be okay.

ntamas commented 6 years ago

Comment added in 7472718.

jgmbenoit commented 6 years ago

Thanks for the merge. Concerning plfit_i_ks_test_discrete, I do not like the difference of logarithms and the differences around: a lot of cancellations may occurs here (eg, (1+epsilon_machine/10)-1 = 0). To workaround it, I see two solutions: (a) figure out a `magic formula' without cancellations; (b) implement an efficient different function (that takes into account the cancellations).

ntamas commented 6 years ago

That’s correct, however the current version is still a significant improvement over the previous one so I’ll keep what we have and then start thinking about alternative solutions on the side.

On 2018. Mar 5., at 10:28, Jérôme Benoit notifications@github.com wrote:

Thanks for the merge. Concerning plfit_i_ks_test_discrete, I do not like the difference of logarithms and the differences around: a lot of cancellations may occurs here (eg, (1+epsilon_machine/10)-1 = 0). To workaround it, I see two solutions: (a) figure out a `magic formula' without cancellations; (b) implement an efficient different function (that takes into account the cancellations).

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.