exact ==> 20!
| 135 | |
| 136 | // exact ==> 20! |
| 137 | uint64_t factorial64(uint8_t n) |
| 138 | { |
| 139 | // to be tested |
| 140 | // if ( n <= 12) return factorial(12); |
| 141 | // uint64_t f = factorial(12); |
| 142 | // for (uint8_t t = 13; t <= n; t++) f *= t; |
| 143 | uint64_t f = 1; |
| 144 | while(n > 1) f *= (n--); |
| 145 | return f; |
| 146 | } |
| 147 | |
| 148 | |
| 149 | // float (4 byte) => 34! |