-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
RFC: add BitsFloat abstract type, leverage dispatch for rounding modes #5007
Conversation
else | ||
error("Unknown Operating System") | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you meant for this to sneak in here.
I generally like this API cleanup. |
If we're going to do this we may want to also have BitsInteger. |
Which is relevant to @vtjnash's pr that had generic definitions of many integer operations. |
Or allow specifying the type of the type in the function definitions |
I'm not sure about this type. There is not really any connection between being a |
@JeffBezanson The rationale was that the function changes the rounding mode of both types (or at least that's my understanding). But dispatching on concrete types is probably more useful (in fact that was my motivation for this). If we do decide to keep it, perhaps |
You could also make BitsFloat or IEEE754 an alias for Kevin On Wed, Dec 4, 2013 at 2:29 PM, Simon Byrne [email protected]:
|
I've removed the abstract type, and replaced it by a union. Before I update the documentation, we need to decide on the behaviour of |
Okay, I've added docs and deprecation warnings (I've taken option b above, which corresponds to old usage). |
|
Okay, I've added the news and rebased. |
RFC: add BitsFloat abstract type, leverage dispatch for rounding modes
This adds an intermediate abstract type below
FloatingPoint
for floating point bitstypes (which I've termedBitsFloat
, however it might be better to change this to make it more visually distinct fromBigFloat
). It also changes the behaviour of the rounding mode functions to leverage dispatch, for example:It still requires some documentation, there are options for further behaviour:
set_rounding(RoundUp)
to change both modesset_rounding(Float64,RoundUp) == set_rounding(BitsFloat,RoundUp)