Merge branch 'elliot/verify-script-floating-point-fix' into 'main'
verify.py floating-point fix See merge request course-asl-fastcode26/team70!15
This commit is contained in:
@@ -5,7 +5,7 @@ import math
|
|||||||
if len(sys.argv) < 3:
|
if len(sys.argv) < 3:
|
||||||
sys.exit("Use it like: python verify.py reference.csv generated.csv [tol]")
|
sys.exit("Use it like: python verify.py reference.csv generated.csv [tol]")
|
||||||
# We can use this later in case that we wanna compare something with a tolerance
|
# We can use this later in case that we wanna compare something with a tolerance
|
||||||
tol = float(sys.argv[3]) if len(sys.argv) > 3 else 0.0
|
tol = float(sys.argv[3]) if len(sys.argv) > 3 else 0.00001
|
||||||
|
|
||||||
with open(sys.argv[1], newline="") as f:
|
with open(sys.argv[1], newline="") as f:
|
||||||
ref = list(csv.reader(f))
|
ref = list(csv.reader(f))
|
||||||
|
|||||||
Reference in New Issue
Block a user