… | |
… | |
452 | negatable, that is, both C<m> and C<-m> must be representable in its |
452 | negatable, that is, both C<m> and C<-m> must be representable in its |
453 | type (this typically includes the minimum signed integer value, the same |
453 | type (this typically includes the minimum signed integer value, the same |
454 | limitation as for C</> and C<%> in C). |
454 | limitation as for C</> and C<%> in C). |
455 | |
455 | |
456 | Current GCC versions compile this into an efficient branchless sequence on |
456 | Current GCC versions compile this into an efficient branchless sequence on |
457 | many systems. |
457 | almost all CPUs. |
458 | |
458 | |
459 | For example, when you want to rotate forward through the members of an |
459 | For example, when you want to rotate forward through the members of an |
460 | array for increasing C<m> (which might be negative), then you should use |
460 | array for increasing C<m> (which might be negative), then you should use |
461 | C<ecb_mod>, as the C<%> operator might give either negative results, or |
461 | C<ecb_mod>, as the C<%> operator might give either negative results, or |
462 | change direction for negative values: |
462 | change direction for negative values: |