diff options
-rw-r--r-- | ecc.hs | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1,3 +1,4 @@ +import Text.Printf data FieldElement = FieldElement @@ -56,9 +57,7 @@ data ECPoint instance Show ECPoint where show Infinity = "ECPoint(Infinity)" - show p = - "ECPoint(" ++ - show (x p) ++ ", " ++ show (y p) ++ ")_" ++ show (a p) ++ "_" ++ show (b p) + show p = printf "ECPoint(%f, %f)_%f_%f" (x p) (y p) (a p) (b p) validECPoint :: ECPoint -> Bool validECPoint Infinity = True |