-
Notifications
You must be signed in to change notification settings - Fork 30
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
Comments
I don't think it's implemented. It shouldn't be too tricky to do so. The
main thing is to update primTable in
https://github.com/hakaru-dev/hakaru/blob/master/haskell/Language/Hakaru/Parser/SymbolResolve.hs
Thank you for taking the time to make these issues. We really appreciate it
:)
…On Nov 21, 2017 23:46, "maymoo99" ***@***.***> wrote:
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?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#116>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAhUQ4XHbmaMKDCVDcYBlGmYk8GXNojks5s42C7gaJpZM4QmqAo>
.
|
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? |
So if you are using the hakaru command, the coercion logic you are hitting
is
https://github.com/hakaru-dev/hakaru/blob/master/haskell/Language/Hakaru/Syntax/Value.hs#L95
We chose to go with floor but if you think round is more sensible, it's
easy enough to change.
…On Nov 22, 2017 02:36, "maymoo99" ***@***.***> wrote:
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?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#116 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAhUS8uLHZzNEsKxMbsi71XPn7M3m8xks5s44iLgaJpZM4QmqAo>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The real2int function (which is specified here: http://hakaru-dev.github.io/lang/coercions/) does not seem to be implemented
The text was updated successfully, but these errors were encountered: