-
Notifications
You must be signed in to change notification settings - Fork 119
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
Float: Introduce floating point api infinite #522
Float: Introduce floating point api infinite #522
Conversation
* Remove the TODO workaround as fixed. Signed-off-by: Pan Li <[email protected]>
* Introduce new float api float_is_inf. * Add test case for half, single and double floating point. * Add inf to interface. Signed-off-by: Pan Li <[email protected]>
…oat-point-infinite
Signed-off-by: Pan Li <[email protected]>
lib/float/inf.sail
Outdated
val float_is_inf : fp_bits -> bool | ||
function float_is_inf (op) = { | ||
let struct {_, exp, mantissa} = float_decompose(op); | ||
let is_nan = exp == sail_ones(length(exp)) |
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 probably be is_inf
instead of is_nan
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.
Nice catch, thanks and updated!
Signed-off-by: Pan Li <[email protected]>
test/float/inf_test.sail
Outdated
$include <float/inf.sail> | ||
|
||
function test_float_is_inf() -> unit = { | ||
/* Half flating 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.
Typo in the comments here
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.
Oops, let me update soon and file another PR for other test files.
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.
Updated.
Signed-off-by: Pan Li <[email protected]>
Sorry for taking a while with these, I've been rather busy the past week. |
Thanks. Never mind and take your time, ;)! |
Signed-off-by: Pan Li [email protected]