lib_2d icon indicating copy to clipboard operation
lib_2d copied to clipboard

Potential error handles.

Open 326037785 opened this issue 1 year ago • 0 comments

For the functions in BeizerInterpolation:

1、 unsigned long long int faculty(unsigned int number) { unsigned long long int f = 1; for(unsigned int i =1; i <= number; ++i) f *= i; return f; } The user may input the number which is too large, it needs a alarm for the input"number" 2、 T binomial_coeff(unsigned int n, unsigned int k) { return faculty(n) / ( faculty(k) * faculty(n-k) ); } k should be less than n, and when k == n or k == 1, it can return 1 as to reduce complexity.

326037785 avatar Oct 26 '24 07:10 326037785