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

real2int function? #116

Open
mkhattab940 opened this issue Nov 21, 2017 · 3 comments
Open

real2int function? #116

mkhattab940 opened this issue Nov 21, 2017 · 3 comments

Comments

@mkhattab940
Copy link
Contributor

The real2int function (which is specified here: http://hakaru-dev.github.io/lang/coercions/) does not seem to be implemented

Name not in scope: real2int

30| 	return real2int(num/(den1*den2))
                   ^^^^^^^^
Perhaps it is a typo?
@zaxtax
Copy link
Member

zaxtax commented Nov 21, 2017 via email

@mkhattab940
Copy link
Contributor Author

Thanks zaxtax. I was able to get it working. However, there seems to be rounding errors. How can I ensure I round to nearest integer?

@zaxtax
Copy link
Member

zaxtax commented Nov 22, 2017 via email

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