-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
no_std does not impl sqrt for f32 and f64 #39473
Comments
Yes this is intended I think. |
@nagisa the implementation of |
From what I understand, many of those intrinsics get lowered to functions whose definitions usually live in |
What @FenrirWolf said is correct. |
That's unfortunate but understandable. |
Maybe we could increase granularity by moving that kind of stuff to a
libmath crate that pulls in libm?
…On Feb 2, 2017 19:45, "Casper" ***@***.***> wrote:
That's unfortunate but understandable.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#39473 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAC3n1m10X0xCE3N_xkE9saa3Bccpf7Yks5rYnixgaJpZM4L1t4b>
.
|
Better yet would be implementations of those functions in Rust, similar to the |
@FenrirWolf big plus from me. math functions like those defined in |
@nagisa thanks for the pointer to your math.rs crate. It looks like it is the most complete For me it would make a lot of sense to replace existing Rust |
I propose that we close this issue since this is something that is intentional for now; should we ever move to Rust implementations of math functions, most likely all functions on f32/f64 should be reevaluated for inclusion in core. cc @rust-lang/libs |
I completely forgot about this issue! I agree with Mark, the subject seems settled that for now this is expected behaviour due to how core works. |
Any updates on this? Documentation at a minimum would be great, since it's a very odd issue to run into given the present error message. Some of the functions, like |
This is pretty hard -- I don't have a link handy, but there are a bunch of considerations that need to go into doing this correctly. I believe some folks are working on it though... I recall a PR or two flying by in the past couple weeks. |
The current open issue for this is #50145. |
I tried the following code (compiled as a library):
I expected to see this happen: The above code working and calling the correct
sqrt
function.The core docs for the f32 primitive type 404s and unlike the integer types does not contain a link to f32's primitive type info page.
Instead this happened:
Is this intended?
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: