| 1 | #cxx . . $ `<file>/ref10/crypto_sign/fe_isnegative.c`/include "fe.h"cxx . . $ `<file>/ref10/crypto_sign/fe.h`/ |
| 2 | |
| 3 | /* |
| 4 | return 1 if f is in {1,3,5,...,q-2} |
| 5 | return 0 if f is in {0,2,4,...,q-1} |
| 6 | |
| 7 | Preconditions: |
| 8 | |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. |
| 9 | */ |
| 10 | |
| 11 | int fe_isnegativecxx . . $ `ref10/crypto_sign/fe.h:22:9`!(const fecxx . . $ fe# f) |
| 12 | { |
| 13 | unsigned char s[32]; |
| 14 | fe_tobytescxx . . $ `ref10/crypto_sign/fe.h:19:9`!(s,f); |
| 15 | return s[0] & 1; |
| 16 | } |