Skip to content

Commit 2c3254e

Browse files
Update dot.jl
1 parent 67027e1 commit 2c3254e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/float/dot.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#= DOES NOT WORK PROPERLY
12
for (TT,dot_f) in [(:ArbReal, @libarb(arb_dot)),(:ArbComplex, @libarb(acb_dot))]
23
@eval begin
34
function LinearAlgebra.dot(x::ArblibVector{T}, y::ArblibVector{T}) where {T<:$TT}
@@ -16,9 +17,14 @@ for (TT,dot_f) in [(:ArbReal, @libarb(arb_dot)),(:ArbComplex, @libarb(acb_dot))]
1617
end
1718
end
1819
end
20+
=#
1921

2022
function LinearAlgebra.dot(x::AbstractVector{T}, y::AbstractVector{T}) where {T<:ArbNumber}
2123
length(x) == length(y) || throw(DimensionMismatch("x and y must have the same lengths"))
24+
xy = x .* y
25+
return sum(xy)
26+
27+
#= does not work properly
2228
xv = ArblibVector(x)
2329
yv = ArblibVector(y)
2430
@@ -28,4 +34,5 @@ function LinearAlgebra.dot(x::AbstractVector{T}, y::AbstractVector{T}) where {T<
2834
free!(yv)
2935
3036
T(d)
37+
=#
3138
end

0 commit comments

Comments
 (0)