Crate sum_of_products

Crate sum_of_products 

Source
Expand description

§sum-of-products

Calculates sums of products from numbers provided on stdin.

§Usage

echo -e "2 3\n4 5" | sop

Output:

2 * 3 =  6
4 * 5 = 20
      ----
        26

Structs§

SumOfProducts
Result of computing products and their sum.

Functions§

compute
Computes the product of each row and the sum of all products.
parse
Parses lines of whitespace-separated numbers into rows of f64 values.
render
Formats the computation as aligned formulas with a sum line.