Closed lungsi closed 5 years ago
No, because for large vectors or matrices, that product will likely overflow unless all elements are close to 1.0. If you need it anyway, you can use (fold * x)
or (fold (double-fn *) x)
(but, again, depending of the contents it might not be numerically stable).
As sum function
Is there a function for product of values of entries of a vector?