Skip to content
Chris Petersen edited this page Oct 16, 2014 · 2 revisions

list-fldot returns the dot product (inner product) of two lists of floats. Note: requires every element in both lists to be a floating point number.

Parameter Description
lst1 First list of floats operated on
lst2 Second list of floats operated on

Example

Example 1: Calculate the dot product of two lists using both the regular and optimized forms.

> (list-dot (list 1 2 3 4) (list 1 2 3 4))
30
> (list-fldot (list 1. 2. 3.) (list 1. 2. 3.))
14.
Clone this wiki locally