-
Notifications
You must be signed in to change notification settings - Fork 53
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
add floating point support to cider #2335
Conversation
Oh yeah this is the printing problem I mentioned |
Looks like I might have been able to solve the issue with the use of |
New output:
|
Woo! Awesome! Thanks for taking this up @ekiwi! |
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.
Looks great! Had a very minor question about a signature, but otherwise I think it's good to go
} => { | ||
let value = match width { | ||
32 => { | ||
debug_assert_eq!(chunk.len(), 4); |
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.
Should we make these just assert!
? The test probably isn't expensive here
// we need to inject the string directly in order to maintain the correct rounding | ||
Number::from_string_unchecked(value) |
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.
Truly cursed! Totally makes sense, though
@@ -227,7 +239,7 @@ impl ParseVec { | |||
} | |||
|
|||
pub fn parse(&self, format: &FormatInfo) -> Result<DataVec, ParseError> { | |||
if format.is_fixedpt() { | |||
if format.is_fixedpt() || format.is_floating_point() { |
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.
Glad we could reuse all this!
Now this fails because the test is wrong: #2336 |
@rachitnigam : now the ball is in your court: #2336 |
#2337 but still has a roundtripping bug. We should also fix support for negative floating-point values while we're at it. |
--through cider \ | ||
-s sim.data={}.data \ | ||
-s calyx.args="--log off" \ | ||
{} | jq --sort-keys |
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.
Please use the new jq
stage.
Fixes #2336. Currently running into the same problem as #2335 (comment) @ekiwi how did you fix it on the Rust side?
Somewhere, things still get messed up.
I get:
But the expected output is: