| 2499 | */ |
| 2500 | template<class ValueType> |
| 2501 | ValueType GammaPlusLowIntegerInt(uint n, CGamma<ValueType> & cgamma) |
| 2502 | { |
| 2503 | TTMATH_ASSERT( n > 0 ) |
| 2504 | |
| 2505 | if( n - 1 < static_cast<uint>(cgamma.fact.size()) ) |
| 2506 | return cgamma.fact[n - 1]; |
| 2507 | |
| 2508 | ValueType res; |
| 2509 | uint start = 2; |
| 2510 | |
| 2511 | if( cgamma.fact.size() < 2 ) |
| 2512 | { |
| 2513 | res.SetOne(); |
| 2514 | } |
| 2515 | else |
| 2516 | { |
| 2517 | start = static_cast<uint>(cgamma.fact.size()); |
| 2518 | res = cgamma.fact[start-1]; |
| 2519 | } |
| 2520 | |
| 2521 | for(uint i=start ; i<n ; ++i) |
| 2522 | res.MulInt(i); |
| 2523 | |
| 2524 | return res; |
| 2525 | } |
| 2526 | |
| 2527 | |
| 2528 | /*! |
no test coverage detected