☰
Debian Codegraph
@
0.18.5.0+~0+20260428-1
/
/
src
/
crypto
/
crypto_ops_builder
/
ref10
/
fe_isnegative.c
☽
☼
src/crypto/crypto_ops_builder/ref10/fe_isnegative.c
code
plain
raw
symbols
SCIP
public-domain
None (in the public domain)
debian/copyright
1
#include
"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_isnegative
(
const
fe
f)
12
{
13
unsigned
char
s[
32
];
14
fe_tobytes
(s,f);
15
return
s[
0
] &
1
;
16
}