Skip to content

Commit

Permalink
Float: Fix comments typo in test and align space format (#533)
Browse files Browse the repository at this point in the history
* Fix one typo in test comments.
* Align the space in format.

Signed-off-by: Pan Li <pan2.li@intel.com>
  • Loading branch information
Incarnation-p-lee committed May 14, 2024
1 parent 65d0179 commit 2b258a2
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions test/float/nan_test.sail
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ default Order dec
$include <prelude.sail>
$include <float/nan.sail>

function test_float_is_nan() -> unit = {
/* Half flating point */
function test_float_is_nan () -> unit = {
/* Half floating point */
assert(float_is_nan(0x7e00));
assert(float_is_nan(0x7c01));
assert(float_is_nan(0x7c10));
Expand All @@ -51,7 +51,7 @@ function test_float_is_nan() -> unit = {
assert(float_is_nan(0xdb00) == false);
assert(float_is_nan(0xfc00) == false);

/* Single flating point */
/* Single floating point */
assert(float_is_nan(0x7fc00000));
assert(float_is_nan(0x7f800001));
assert(float_is_nan(0x7fc00100));
Expand All @@ -69,7 +69,7 @@ function test_float_is_nan() -> unit = {
assert(float_is_nan(0xdf000000) == false);
assert(float_is_nan(0xfe800000) == false);

/* Double flating point */
/* Double floating point */
assert(float_is_nan(0x7ff8000000000000));
assert(float_is_nan(0x7ff0000000000001));
assert(float_is_nan(0x7ff8000000000100));
Expand All @@ -89,7 +89,7 @@ function test_float_is_nan() -> unit = {
}

function test_float_is_snan () -> unit = {
/* Half flating point */
/* Half floating point */
assert(float_is_snan(0x7d00));
assert(float_is_snan(0x7d01));

Expand All @@ -100,7 +100,7 @@ function test_float_is_snan () -> unit = {
assert(float_is_snan(0xde01) == false);
assert(float_is_snan(0xff01) == false);

/* Single flating point */
/* Single floating point */
assert(float_is_snan(0x7fa00000));
assert(float_is_snan(0x7fa00001));

Expand All @@ -111,7 +111,7 @@ function test_float_is_snan () -> unit = {
assert(float_is_snan(0xffc00001) == false);
assert(float_is_snan(0xfec00001) == false);

/* Double flating point */
/* Double floating point */
assert(float_is_snan(0x7ff7000000000000));
assert(float_is_snan(0x7ff7000000000001));

Expand All @@ -124,7 +124,7 @@ function test_float_is_snan () -> unit = {
}

function test_float_is_qnan () -> unit = {
/* Half flating point */
/* Half floating point */
assert(float_is_qnan(0x7e00));
assert(float_is_qnan(0x7e01));

Expand All @@ -135,7 +135,7 @@ function test_float_is_qnan () -> unit = {
assert(float_is_qnan(0xdc01) == false);
assert(float_is_qnan(0xfc01) == false);

/* Single flating pont */
/* Single floating pont */
assert(float_is_qnan(0x7fc00000));
assert(float_is_qnan(0x7fc00001));

Expand All @@ -146,7 +146,7 @@ function test_float_is_qnan () -> unit = {
assert(float_is_qnan(0xffa00001) == false);
assert(float_is_qnan(0xfea00001) == false);

/* Double flating point */
/* Double floating point */
assert(float_is_qnan(0x7ff8000000000000));
assert(float_is_qnan(0x7ff8000000000001));

Expand All @@ -158,8 +158,8 @@ function test_float_is_qnan () -> unit = {
assert(float_is_qnan(0xfef7000000000001) == false);
}

function main() -> unit = {
test_float_is_nan ();
test_float_is_snan ();
test_float_is_qnan ();
function main () -> unit = {
test_float_is_nan();
test_float_is_snan();
test_float_is_qnan();
}

0 comments on commit 2b258a2

Please sign in to comment.