Skip to content

SigmoidNumbers and sparse Matrix-Vector-Multiplication #2

@milankl

Description

@milankl

I want to use posits in sparse Matrix-Vector multiplications. If I do something like

using SigmoidNumbers
P = Posit{8,0}

i = [1,2,3,4,5]
j = [2,3,4,5,1]
v1 = P.([-1.2,1.1,-1.,2.,3.])

S = sparse(i,j,v1)
x = S*v1

I get the error ERROR: MethodError: no method matching zero(::Type{Any}). Would it be possible to implement the zero function for posits?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions