Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversion of irrational numbers to Takums fails #2

Closed
sloede opened this issue Jan 27, 2025 · 2 comments
Closed

Conversion of irrational numbers to Takums fails #2

sloede opened this issue Jan 27, 2025 · 2 comments

Comments

@sloede
Copy link

sloede commented Jan 27, 2025

MWE:

julia> using Takums
julia> convert(Takum64, pi)
ERROR: MethodError: no method matching Takum64(::Irrational{:π})
The type `Takum64` exists, but no method is defined for this combination of argument types when trying to construct it.

Closest candidates are:
  (::Type{T})(::Real, ::RoundingMode) where T<:AbstractFloat
   @ Base rounding.jl:265
  (::Type{T})(::T) where T<:Number
   @ Core boot.jl:900
  Takum64(::Float16)
   @ Takums ~/.julia/packages/Takums/hET5q/src/Takums.jl:213
  ...

Stacktrace:
 [1] convert(::Type{Takum64}, x::Irrational{:π})
   @ Base ./number.jl:7
 [2] top-level scope
   @ REPL[14]:1
@hunhold
Copy link
Member

hunhold commented Jan 27, 2025

Dear Michael,

thanks for your report!

An interface for converting irrationals to takums was already implemented in 25963b7, but not released yet. I pushed v0.5.4 now (see here) and it should be available in the next 30-60 minutes.

With best regards

Laslo

@hunhold hunhold closed this as completed Jan 27, 2025
@sloede
Copy link
Author

sloede commented Jan 27, 2025

Thanks, I can confirm that v0.5.4 has fixed this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants