I’m currently exploring interfacing C and R (using R’s .Call for speed). I’ve only used C for trivial integer computation and text processing applications, and I’ve never had to worry about issues with float variables, underflow, etc. What tests can I write for functions to ensure numerical accuracy?
I’m currently exploring interfacing C and R (using R’s .Call for speed). I’ve only
Share
For a great overview of possible edge cases, see this Wikipedia article.
Then for unit tests see The pitfalls of verifying floating-point computations.