Skip to content

tests/c_lib/common/src/test_sqrt: Fix when double is not 64 bits #90650

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

Merged
merged 2 commits into from
May 29, 2025

Conversation

aescolar
Copy link
Member

@aescolar aescolar commented May 27, 2025

The combination of
3231269
74c9e7a
broke this test, when __SIZEOF_DOUBLE__ != 8.
In that case the test will fail to build,
as the variables the code uses are left ifdef'ed out.

Let's fix it.

and as a free bonus:

Fix several code compliance issues.

aescolar added 2 commits May 27, 2025 12:08
The combination of
3231269
74c9e7a
broke this test, when __SIZEOF_DOUBLE__ != 8.
In that case the test will fail to build,
as the variables the code uses are left ifdef'ed out.

Let's fix it.

Signed-off-by: Alberto Escolar Piedras <[email protected]>
Fix several code compliance issues.

Signed-off-by: Alberto Escolar Piedras <[email protected]>
@aescolar aescolar changed the title Skip double sqrt fix tests/c_lib/common/src/test_sqrt: Fix when double is not 64 bits May 27, 2025
@aescolar aescolar marked this pull request as ready for review May 27, 2025 10:15
@github-actions github-actions bot added the area: C Library C Standard Library label May 27, 2025
@github-actions github-actions bot requested a review from stephanosio May 27, 2025 10:16
Copy link

Copy link
Collaborator

@keith-packard keith-packard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this.

Copy link
Member

@cfriedt cfriedt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is one typo that could be fixed but not blocking.

5.0, 6.0, 7.0, 8.0, 9.0, /* numbers across the decade */
3.14159265359, 2.718281828, /* irrational numbers pi and e */
123.4, 0.025, 0.10, 1.875 /* numbers with infinite */
/* repeating binary representationa */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/* repeating binary representationa */
/* repeating binary representations */

@fabiobaltieri fabiobaltieri merged commit 13fa0c5 into zephyrproject-rtos:main May 29, 2025
36 of 38 checks passed
@aescolar aescolar deleted the skip-double-sqrt_fix branch May 30, 2025 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: C Library C Standard Library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants