I propose to create a math working group to focus on the healthy development of the Rust language numerical calculation system.
First, clarify that although the working group expects to cover scientific computing content (refer to Matlab, Wolfram Mathematica, etc), it still proposes to simply call as math working group.
I wonder why there is no math working group in Rust? Numerical calculations are important to any language, even for rust language that was not born for numerical calculations.
The responsibilities of the working group roughly include the followings:
Organize and propose the crate-chain of scientific computing;
Define certain crates as "working group recommended" in the crate-chain to reduce the selection difficulty for novices;
Identify missing crates in mathematics, such as symbolic calculations, PDE solvers, etc. for now, and mark some missing crates as "urgently needed";
For some key missing crates, the working group can also create projects and implement them;
And more things that I didn't expect now;
I hope that this proposal can be supported by the community, and that the working group can be formed by community numerical computing experts. I will also try my best to devote time to support this working group.
You may get more interest on this if you repost it in the Rust users' forum. This forum is dedicated to Rust language and tooling issues, so is less likely to be read by your intended audience.
I've created an algebraic numbers crate, that should be useful for some things. I also created a non-official reference implementation of IEEE 754 floating-point based on the algebraic numbers crate -- intended to be easy to understand to assure correctness rather than being fast.
One of the big additions I was hoping to make that might be slightly controversial is to make a 32 bit version of most of the basic math functions.
I haven't looked into it carefully yet, but from what I've seen, many (all?) math functions are only implemented in f64 and then truncated back to f32...
Not only is that slower, but in many cases it is frustrating when the truncated result is different from the rounded result.
This is probably platform-dependent. For most of these things Rust just calls the platform library; it's not implementing them itself. So if you want something better, check your libm.
I think you’re wrong. What’s getting called is the cosf32 or cosf64 intrinsic which then get compiled in a platform-dependent way. For example on linux-gnu, this seems to be calling into the system libc/libm/whatever_it’s_called functions cos and cosf (see e.g. this assembly). Those would then be pre-installed libraries on your system, probably implemented in C, dynamically loaded when you run the Rust program.