lib_2d
lib_2d copied to clipboard
Potential error handles.
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.