# HG changeset patch
# User Janus Dam Nielsen <[email protected]>
# Date 1240830884 -7200
# Node ID 4cbb298a7ed8db12facfeafe40febbc24bc79701
# Parent 4397d64715c625445b0170daf5dfed39ac769219
Added comment to method signed()
diff --git a/viff/field.py b/viff/field.py
--- a/viff/field.py
+++ b/viff/field.py
@@ -506,7 +506,8 @@
return (self.value >> index) & 1
def signed(self):
- """
+ """Return a signed integer representation of the value.
+
if x > floor(p/2) then subtract p to obtain negative integer
"""
if self.value > ((self.modulus-1)/2):
@@ -515,7 +516,7 @@
return self.value
def unsigned(self):
- """Returns a unsigned representation of the value"""
+ """Return a unsigned representation of the value"""
return self.value
def __repr__(self):
_______________________________________________
viff-patches mailing list
[email protected]
http://lists.viff.dk/listinfo.cgi/viff-patches-viff.dk