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

refactor: use stdlib equivalent instead of built-in, fix indentation in math/base/special/ldexp #2781

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

gunjjoshi
Copy link
Member

Description

What is the purpose of this pull request?

This pull request:

  • replaces the use of built-in pow with stdlib_base_pow.
  • fixes indentation in example.c.

Related Issues

Does this pull request have any related issues?

None.

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.


@stdlib-js/reviewers

Signed-off-by: Gunj Joshi <gunjjoshi8372@gmail.com>
Signed-off-by: Gunj Joshi <gunjjoshi8372@gmail.com>
Signed-off-by: Gunj Joshi <gunjjoshi8372@gmail.com>
@stdlib-bot stdlib-bot added the Math Issue or pull request specific to math functionality. label Aug 12, 2024
@gunjjoshi
Copy link
Member Author

This error in examples comes even without applying the changes in this PR. I'll have a look on ldexp to find out the problem.

@gunjjoshi
Copy link
Member Author

The error message comes as:

example.c:20:10: fatal error: 'stdlib/math/base/special/ldexp.h' file not found
#include "stdlib/math/base/special/ldexp.h"

even though the header files looks correct.

@Planeshifter
Copy link
Member

@gunjjoshi Looks like ldexp is missing from the manifest.json' dependencies in the example configuration.

Signed-off-by: Gunj Joshi <gunjjoshi8372@gmail.com>
Signed-off-by: Gunj Joshi <gunjjoshi8372@gmail.com>
@gunjjoshi
Copy link
Member Author

@gunjjoshi Looks like ldexp is missing from the manifest.json' dependencies in the example configuration.

@Planeshifter For other packages too, we do not include the package's path in the example configuration of manifest.json, right? That is included directly from the header file inside the package. Still, I tried after including that, but the condition was the same.

@Planeshifter
Copy link
Member

@gunjjoshi Yeah, the package itself shouldn't be listed as a dependency under its own configuration. I was mistakenly under the impression that the failure was caused in a different package's example. Not clear to me what's going on right now... Also seeing failures loading different modules in the CI checks here.

@Planeshifter
Copy link
Member

Planeshifter commented Aug 12, 2024

@gunjjoshi @stdlib/number/float32/base/to-word seems wrong as a dependency in manifest.json. We need @stdlib/number/float64/base/to-words, I think.

@gunjjoshi
Copy link
Member Author

@Planeshifter It doesn't seem we have used that package anywhere in ldexp. We should remove that.

@gunjjoshi
Copy link
Member Author

We have used float64/base/to_words in main.c, but we listed float32/base/to_word in manifest.json. Even after rectifying that, the error persists.

@Planeshifter
Copy link
Member

After looking into this a bit more, I noticed that running the C examples for @stdlib/math/base/special/pow is failing as well.

Running the examples with DEBUG=library-manifest:main, it looks to me as if we have a cycle here and @stdlib/utils/library-manifest may not be handling those yet?

cc @kgryte

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Math Issue or pull request specific to math functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants