Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "blas/ddot/docs/types/index.d"

Index

Functions

Functions

ddot

  • Computes the dot product of two double-precision floating-point vectors.

    throws

    first argument must be a 1-dimensional ndarray containing double-precision floating-point numbers

    throws

    second argument must be a 1-dimensional ndarray containing double-precision floating-point numbers

    throws

    input arrays must be the same length

    Parameters

    Returns number

    dot product

    Example

    var Float64Array = require( `@stdlib/array/float64` );
    var array = require( `@stdlib/ndarray/array` );
    
    var x = array( new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ) );
    var y = array( new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ) );
    
    var z = ddot( x, y );
    // returns -5.0