Skip to content

Commit 36a6fea

Browse files
committed
feat: support Base.float
1 parent 4709537 commit 36a6fea

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/TracedRNumber.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,5 @@ for (jlop, hloop) in (
159159
end
160160

161161
(::TypeCast{T})(x::TracedRNumber{T2}) where {T,T2} = promote_to(TracedRNumber{T}, x)
162+
163+
Base.float(x::TracedRNumber{T}) where {T} = promote_to(TracedRNumber{float(T)}, x)

0 commit comments

Comments
 (0)