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
Simplify non-integer code #698
Conversation
-- A_{-1} = 1, A_0 = b_0 | ||
-- B_{-1} = 0, B_0 = 1 | ||
-- A_n = b_n*A_{n-1} + a_n*A_{n-2} | ||
-- B_n = b_n*B_{n-1} + a_n*B_{n-2} | ||
-- |
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've kept this hunk because the expressions are simpler ('n' vs 'n+1'), vertical alignment highlights its similarities and differences, is the same form in which are written in the doc, and also matches the parameters of the function implementation.
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.
LGTM, thanks!
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.
It seems the suggested change is needed
shelley/chain-and-ledger/dependencies/non-integer/src/NonIntegral.hs
Outdated
Show resolved
Hide resolved
…ral.hs Co-Authored-By: Matthias Güdemann <matthias.gudemann@iohk.io>
Hmm, I don't understand why is needed. Do you mean that the Show constraint is unnecessary here? |
I got a compilation error with |
Oh, I see. It's due to the compiler flags |
yes, we changed to very strict options recently
…On Tue, Aug 6, 2019 at 11:32 AM csoroz ***@***.***> wrote:
Oh, I see. It's due to the compiler flags -Wredundant-constraints and
-Werror. I was compiling with -Wall only.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#698>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AATYOTFWYDENNWLVSO56OQDQDFAKFANCNFSM4IH5GNSQ>
.
--
*Matthias Güdemann*
FORMAL METHODS SOFTWARE ENGINEER | AUGSBURG, GERMANY
Website: www.iohk.io <http://iohk.io>
Skype: matthias.guedemann
Twitter: @mgudemann
PGP Key ID: 0x734ECFFF51BEA8B5
<http://iohk.io>[image: Input Output] <http://iohk.io>
[image: Twitter] <https://twitter.com/InputOutputHK> [image: Github]
<https://github.com/input-output-hk> [image: LinkedIn]
<https://www.linkedin.com/company/input-output-global>
|
I've used this test code (adapted from the C++ reference implementation) to check that the Golden test cases give the same results: https://gist.github.com/csoroz/fc337aad325417526f5b153e70502f28