returns the smallest composite of 2, 3, 5, 7 and 11 which is >= n */
| 258 | |
| 259 | /* returns the smallest composite of 2, 3, 5, 7 and 11 which is >= n */ |
| 260 | NOINLINE static size_t good_size(size_t n) |
| 261 | { |
| 262 | if (n<=6) return n; |
| 263 | |
| 264 | size_t bestfac=2*n; |
| 265 | for (size_t f2=1; f2<bestfac; f2*=2) |
| 266 | for (size_t f23=f2; f23<bestfac; f23*=3) |
| 267 | for (size_t f235=f23; f235<bestfac; f235*=5) |
| 268 | for (size_t f2357=f235; f2357<bestfac; f2357*=7) |
| 269 | for (size_t f235711=f2357; f235711<bestfac; f235711*=11) |
| 270 | if (f235711>=n) bestfac=f235711; |
| 271 | return bestfac; |
| 272 | } |
| 273 | |
| 274 | typedef struct cmplx { |
| 275 | double r,i; |
no outgoing calls
no test coverage detected