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

make rounding modes parametric types #8794

Merged
merged 1 commit into from
Oct 24, 2014

Conversation

simonbyrne
Copy link
Contributor

This makes RoundingMode a parametric type, which hopefully will be the first step in a sane approach to dealing with rounding modes.

The key benefit is that it allows dispatch on mode. For example, in #8463, we could use:

convert(Float64,pi,RoundDown) == 3.141592653589793
convert(Float64,pi,RoundUp) == 3.1415926535897936

cc: @nolta

@jiahao
Copy link
Member

jiahao commented Oct 23, 2014

Finally, our floating point fields are RoundUp ready!

images

@ivarne
Copy link
Member

ivarne commented Oct 24, 2014

I like "sane" approaches.
+1

@nolta
Copy link
Member

nolta commented Oct 24, 2014

LGTM.

In light of #8712, maybe Float64(pi, RoundUp)?

nolta added a commit that referenced this pull request Oct 24, 2014
make rounding modes parametric types
@nolta nolta merged commit e73d7fc into JuliaLang:master Oct 24, 2014
@simonbyrne simonbyrne deleted the rounding-parametric branch March 10, 2015 12:01
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

Successfully merging this pull request may close these issues.

4 participants