-
Notifications
You must be signed in to change notification settings - Fork 501
Value costing: insertCoin, unionValue, scaleValue #7435
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
base: master
Are you sure you want to change the base?
Conversation
a892843 to
1e44958
Compare
1e44958 to
abdc6ed
Compare
| | QuadraticInY OneVariableQuadraticFunction | ||
| | QuadraticInZ OneVariableQuadraticFunction | ||
| | QuadraticInXAndY TwoVariableQuadraticFunction | ||
| | SquareOfSum SquareOfTwoVariableSumFunction |
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.
This most likely won't be needed - a + bx + cy should be good enough.
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.
The SquareOfSum stuff is from before the recent experimentation for unionValue, so it's outdated.
a + bx + cy should be good enough.
I would assume a, b and c are the coefficients we are trying to determine while x and y are the sizes of the inputs, right? Then, as far as I understand, this translates to running R's linear regression algorithm for the t ~ x + y formula. @kwxm am I understanding what @zliu41 is suggesting correctly?
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.
Btw, just to be sure, I(x + y) means "find a coefficient for (x + y)" while x + y means "find a coefficient for x and a coefficient for y", right?
| ) | ||
| | pId <- policyIds | ||
| ] | ||
| amt = mkQuantity 10000000 |
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 we need to use smaller integers at all - just always use maxBound / 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 keep getting errors when using integers close to the maxBound, not sure why yet. This is the same issue I ran into when working on the scaleValue generator. These errors appear despite taking precautions to not allow the additions/multiplications to overflow. Since for unionValue the size of the integers doesn't matter I have postponed the investigation for a bit later, but it's on my TODO list.







Fixes https://github.com/IntersectMBO/plutus-private/issues/1899
Fixes https://github.com/IntersectMBO/plutus-private/issues/1900