-
Notifications
You must be signed in to change notification settings - Fork 47
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
Parse Floating Point Constants #2195
base: calyx-float
Are you sure you want to change the base?
Conversation
… decimal representation of real numbers
1c8e8c8
to
ce90f1d
Compare
}, | ||
"mem_write": { | ||
"data": [ | ||
4.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.
Oh the second thought is that it only proves that it reads/writes the same value, but doesn't prove that it's not necessarily intepretting 4.2
as the decimal representation..
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.
Can you explain what you mean by that? The comment is lacking enough context to make sense to me.
@@ -26,7 +27,8 @@ num_lit = ${ | |||
~ ( "d" ~ decimal | |||
| "b" ~ binary | |||
| "x" ~ hex | |||
| "o" ~ octal ) | |||
| "o" ~ octal | |||
| "f" ~ float) |
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.
One challenging thing about this is that we are hardcoding IEEE-754 encoding for floating point and might eventually want to support things like posits (something that @Mark1626 was working on) so we might want a different way to specify floating point numbers?
@sampsyo thoughts? One thing I was thinking is that the syntax is only available in a magical primitive:
cf1 = ieee754_const(5.11231); // Error if exact representation is not possible
This PR tries to address #2061
Support: