Open
Description
We already support converting a FixedDecimal to a Rational, via:
FixedPointDecimals.jl/src/FixedPointDecimals.jl
Lines 324 to 326 in e8c9f3b
We should also provide numerator()
and denominator()
, as part of that interface. They might be implemented like this:
function Base.numerator(x::FixedDecimal{T,f})::T where {T, f}
return value(x)
end
function Base.denominator(x::FixedDecimal{T,f})::T where {T, f}
return coefficient(x)
end