FixedPointNumbers.jl icon indicating copy to clipboard operation
FixedPointNumbers.jl copied to clipboard

Road to 1.0

Open timholy opened this issue 5 years ago • 7 comments

I'd like to move the whole JuliaImages stack to version numbers >= 1.0 (see https://github.com/JuliaImages/Images.jl/issues/825). Let's use this issue to collect plans for breaking changes in the near future.

Breaking changes include things like renamings, returning a different value than we used to (e.g., #129 might qualify, though rounding errors are a big ambiguous), or removing externally-visible functionality. Bug fixes, new features, performance improvements, etc., do not count as breaking, though of course they are very welcome.

timholy avatar Nov 22 '19 15:11 timholy

Although the specific implementation method needs to be discussed separately, "Overflow checked arithmetics #41" needs to be settled.

I am a speed demon as you know.:smiling_imp: I don't think it is good to throw exceptions during calculation. Perhaps what we need is something like Base.Checked. It would be nice to have a macro similar to @fastmath, which allows the user to specify the types of methods, i.e. *op* or checked_*op*. Of course, I want them but I do never want to write them!

kimikage avatar Nov 22 '19 18:11 kimikage

Decide #127

timholy avatar Nov 22 '19 19:11 timholy

rand should be return Array instead of ReinterpretArray for the moment(cf. #125).

kimikage avatar Nov 23 '19 07:11 kimikage

I like the idea of it returning an Array. Though I also want to fix ReinterpreteArray. I'm thinking of writing a special iterator for it, I think that would theoretically solve the problem at least for the cases we care about in JuliaImages.

timholy avatar Nov 23 '19 11:11 timholy

  • Drop support for Fixed{Int8,8} and so on (cf. issue #155, PR #159)

kimikage avatar Jan 14 '20 02:01 kimikage

My draft plan

cf. https://discourse.julialang.org/t/rfc-what-should-the-arithmetic-within-the-fixedpointnumbers-be/46697/43 https://discourse.julialang.org/t/rfc-what-should-the-arithmetic-within-the-fixedpointnumbers-be/46697/47

milestone v0.9.0

  • [x] Change the default * for Normeds to wrapping_mul (PR #236)
  • [ ] Move arithmetic definitions/implementations into a submodule FixedPointNumbers.FixedPointArithmetic (issue #239)
    • Export FixedPointArithmetic and Base operators
    • Make wrapping_* and saturating_* public via CheckedArithmeticCore
  • [ ] Reserve the aliases for unsigned Fixed/signed Normed (issue #228)
  • [ ] Update README
    • Announce checked_*, wrapping_* and saturating_* support
    • Preannounce unsigned Fixed/signed Normed(issue #199)

milestone v0.9.x

  • Supports the rest of the issue #185
  • Improve Fixed-->Fixed/Normed-->Normed conversions (issue #140)
  • Add partial support for 3-arg {wrapping|saturating}_{add|sub|mul}
  • Change the type definitions to Fixed{T<:Integer, f}/Normed{T<:Integer, f} internally
    • Open access to Fixed{<:Unsigned}/Normed{<:Signed} only via their aliases
    • Block the use of Fixed{<:Unsigned}/Normed{<:Signed} via constructors and promotions
  • Add internal support for Fixed{<:Unsigned}/Normed{<:Signed}

milestone v0.10.0

  • ~Make 2-/3-arg wrapping_*/saturating_* public via CheckedArithmeticCore~ -> v0.9.0
  • Support Fixed{<:Unsigned}/Normed{<:Signed} officially
    • Force unsupported downstream packages to declare Fixed{<:Signed}/Normed{<:Unsigned}
  • Drop support for Fixed{Int8,8} and so on
    • cf. issue #155, PR #159

milestone v0.11.0

  • Determine the interface for using multiple types of arithmetic

milestone v1.0.0

  • Remove deprecated stuff

kimikage avatar Sep 27 '20 14:09 kimikage

My personal roadmap has not changed for three years. However, because so much elapsed time has passed, I have withdrawn the roadmap. In other words, I have removed some v0.9 milestone flags.

Therefore, we may be able to release v0.9 without the saturating_* and so on. (I proposed them as a solution to a problem, but the parties to the problem have little interest in the development.)

Meanwhile, unsigned Fixed is something I would like to see its definition by v0.9. (Its functionality can be implemented in downstream packages.)

kimikage avatar Apr 13 '24 23:04 kimikage