Comments (2)
Not too familiar with the implementation, but I guess num.powf(exponent as f32)
should be 2_f32.powf(exponent as f32)
, regardless of the input number. Choosing 2.0
also as the input for this example is indeed confusing.
from rust.
I believe this issue was posted in the wrong repository, as this relates to the crate num-traits. I recommend opening a new issue at github.com/rust-num/num-traits.
The example referenced in this issue can be found at num_traits::float::Float::integer_decode.
The source code is located at src/float.rs#L1863-L1881.
from rust.
Related Issues (20)
- Tracking Issue for `rwlock_downgrade` HOT 4
- Surprising behavior of `'label: for`
- `slice.iter().take_while(f).count()` produces suboptimal assembly code HOT 1
- Incorrect code generated from inline assembly with `inout` register on riscv32im-unknown-none-elf HOT 6
- Performance regression with `get_many_mut()` HOT 1
- The compiler does not report errors for recursive calls that can not be ended HOT 2
- x86_64-win7-windows-msvc target cannot run HOT 11
- Permit library-only and binary-only dependencies HOT 3
- mut struct member var(ref) bind to new obj still hint: does not live long enough HOT 2
- Should `Mutex` and `Condvar` respect priorities? HOT 2
- ICE: `unable to construct a valtree for the unevaluated constant` HOT 3
- fs::read_to_string(config.src.join("src/ci/channel")) failed with No such file or directory (os error 2) HOT 4
- Regression in `type annotations needed for` check between 1.79 and 1.80 HOT 2
- Jump threading MIR opt unsoundly uses bitpattern equality for floats HOT 15
- ICE: `trait takes 1 generic argument but 0 generic arguments were supplied` HOT 2
- Bug when using `cargo check` (my program works with `cargo run`) HOT 1
- zero-sized slices are sometimes placed at 0x1 (1.79+) HOT 16
- Documentation of default value for config.toml's `rust.channel` is inaccurate
- Rustdoc: struct fields are spaced too closely HOT 3
- [Enhancement]: `must_use_xor` to Force Using One of the Functions but not all in a Struct HOT 1
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 rust.