checking .Call() allows the C code to mutate the SEXP objects it is passed
minor
description of math behind computations