Skip to content

norm returns a complex number #1237

@harrysarson

Description

@harrysarson

http://mathjs.org/docs/reference/functions/norm.html documents math.norm as returning a Number or a BigNumber.

However, the frobenius norm of a matrix containing complex values is a complex number (with imaginary part equal to 0).

math.norm(math.matrix([[math.complex(1, 4)]]), 'fro')
// Object { re: 4.123105625617661, im: 0 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions