Comments (6)
- We should absolutely have high quality pure 32-bit impls available within rust.
- They could be "the" impl of each
libm
function on 32-bit CPUs (or whatever criteria) via cfg, or all the time, without having to start a new crate. - As long as the implementation is correct, the origin of the impl doesn't seem important.
So, yeah, option 2 seems best.
from libm.
target_pointer_width tells you nothing about whether f64 is natively supported or not.
from libm.
Has there been any movement on this?
from libm.
Don't forget that we have target attributes: #[cfg(target_pointer_width = "64")]
from libm.
I would personally think that actually having both the 64-bit emulation as well as the 32-bit implementation is a viable option. I would imagine that implementing the 32-bit operation in terms of the 64-bit operation improves code-size if you use both, which might be important for some situations (?).
Additionally I would expected that any 32-bit-specific version would be thoroughly tested, so the maintenance burden doesn't seem like it would be especially high to have two versions (assuming the 32-bit version is a trivial wrapper around the 64-bit version).
The important bit here though I think is the 32-bit-specific CI. I think we'd need a target on CI that verifies that 64-bit things weren't used in the implementation, but I'm not sure how to write that CI myself.
from libm.
We can use 64-bit version for 64-bit systems and have cargo option like force-i32
for special use cases.
from libm.
Related Issues (20)
- Incorrect value of sin(13.11250158914107) on x87 HOT 5
- Cortex-M4F: 'libm::sin()' is 2 times slower than 'sin()' of C newlib-libm HOT 2
- Running musl-reference-tests is impossible outside linux (and still nontrivial to run on linux)
- failed to compile targeting avr HOT 5
- Proving IEEE-754 2008 compliance for all sqrt/sqrtf implementations on all platforms. HOT 1
- aarch 64 compilation failure. HOT 2
- Make all symbols weak? HOT 1
- floor(), floorf(), ceil() and ceilf() Don't actually work on no-std (linker error) HOT 7
- Some functions are producing a different result than musl
- Const eval support HOT 1
- Incorrect `fmaf` results on some inputs HOT 2
- Attempt to negate with overflow in `fma`
- Potential to add #[inline} attributes where possible HOT 2
- Cargo test fails in x86_64-pc-windows-msvc target HOT 1
- Using rint/rintf instead of roundeven/roundevenf appears to break target_arch = "spirv" for spirv-std HOT 1
- Possible errors in some constants? HOT 2
- specify MSRV
- Next release? HOT 1
- Incorrect exponent calculation in the nextafter implementations leads to missed overflow/underflow signals
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libm.