#!/usr/bin/python -Wall

# ================================================================
# This software is released under the terms of the GNU GPL.
# Please see LICENSE.txt in the same directory as this file.
# Copyright (c) John Kerl 2007
# kerl.john.r@gmail.com
# ================================================================

from __future__ import division # 1/2 = 0.5, not 0.
import sys
from sackmat_m import *

argc = len(sys.argv)
if (argc < 2):
	print >> sys.stderr, "Usage: %s {file name 1} {file name 2}" % (sys.argv[0])
	sys.exit(1)

A = read_matrix(frac_reader, sys.argv[1])
argi = 2
while (argi < argc):
	B = read_matrix(frac_reader, sys.argv[argi])
	A = A * B
	argi += 1
print_matrix(A)
