Skip to content
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

Assorted arithmetic intrinsics tests #50

Merged
merged 6 commits into from
Aug 8, 2024
Merged

Conversation

Oneirical
Copy link
Contributor

Part of #45. Please check off the appropriate tickboxes in the issue if this gets merged.

@FractalFir
Copy link
Owner

Some of the tests you provided are failing to compile, because the tests are run in a no_std environment.

error[E0599]: no method named `abs` found for type `f32` in the current scope
  --> ./trigonometry.rs:21:44
   |
21 |     let abs_difference = (cosf32(x) - 1.0).abs();
   |                  

Also, the test macro is roughly equivalent to assert. So, something like this:

  test!(fabsf64(f64::NAN.is_nan()));

is not going to work. Perhaps you meant to write

  test!(fabsf64(f64::NAN).is_nan());

instead?

@Oneirical
Copy link
Contributor Author

Some of the tests you provided are failing to compile, because the tests are run in a no_std environment.

Right, writing code in a no_std environment is a habit to develop. I'll push a fix tomorrow.

@Oneirical Oneirical force-pushed the main branch 3 times, most recently from 429ccd5 to e46f9cc Compare August 8, 2024 15:44
@Oneirical Oneirical marked this pull request as draft August 8, 2024 15:48
@Oneirical Oneirical marked this pull request as ready for review August 8, 2024 16:04
@FractalFir FractalFir merged commit 8b64140 into FractalFir:main Aug 8, 2024
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants