Conversation
|
I'd suggest relaxing the tolerances for the problematic cases (but only those), and additionally adding tests for the problematic cases against a more accurate reference (e.g. using hardcoded values from WA). |
|
Since there is no numerical approximation in this implementation per se, I would suggest testing against a table, exported from any software you prefer, with reasonable tolerances, since you are just testing that you coded the formula correctly. (In the long run I would prefer transitioning to this approach instead of comparing to Rmath) |
|
How about comparing with 1e-8 tolerances to Rmath (to ensure that the shape is about right) and a stricter tolerance check against the BigFloat implementation (if available) One major benefit of pure Julia implementations is that many of them handle BigFloat arguments without any problem. |
This fails tests because this implementation is more accurate than the Rmath version (confirmed via wolframalpha and bigfloats). What should we do here when we are testing against an incorrect implementation?