Giter Site home page Giter Site logo

Comments (6)

Lokathor avatar Lokathor commented on July 30, 2024 5
  • 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.

CryZe avatar CryZe commented on July 30, 2024 1

target_pointer_width tells you nothing about whether f64 is natively supported or not.

from libm.

nickmertin avatar nickmertin commented on July 30, 2024 1

Has there been any movement on this?

from libm.

burrbull avatar burrbull commented on July 30, 2024

Don't forget that we have target attributes: #[cfg(target_pointer_width = "64")]

from libm.

alexcrichton avatar alexcrichton commented on July 30, 2024

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.

burrbull avatar burrbull commented on July 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.