aboutsummaryrefslogtreecommitdiffstats
path: root/ecc.hs
diff options
context:
space:
mode:
Diffstat (limited to 'ecc.hs')
-rw-r--r--ecc.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/ecc.hs b/ecc.hs
index 7c485d0..a35fb24 100644
--- a/ecc.hs
+++ b/ecc.hs
@@ -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