Comments (5)
I'll take a look at doing this either next month or August. Thank you for your request and your patience
from rust-lexical.
@kangalioo That should be doable, definitely. I could just expose the fast path algorithm directly. I'll add this for a feature for the next patch (since we're pre-1.0 for lexical-core) release (minor in lexical).
from rust-lexical.
This has been closed as of the latest commit, I'll keep this open until I publish v0.8, however.
This isn't extensively documented, since it won't be a correct implementation, however, this will work using the following code:
use lexical_parse_float::Options;
use lexical_parse_float::format::STANDARD;
use lexical_parse_float::parse::ParseFloat;
let options = Options::new();
f64::fast_path_complete::<{ STANDARD }>(b"1.34000", &options);
I'll add a line or two to the documentation about this, but I'm not planning on making the API much nicer, but I will guarantee stability for this. This might be a bit slower than the Eisel-Lemire or Bellerophon algorithms for floats with large exponents, due to the iterative multiplications and divisions, but the only alternative is pre-computed tables for all exponents, which I won't due for storage reasons.
from rust-lexical.
This has been added as of recent commits for the v0.8 branch. I'll post a working sample once this full functionality has been released.
from rust-lexical.
Implemented as of lexical v6.0.0 and lexical-core v0.8.0. Thanks for the patience ^_^.
from rust-lexical.
Related Issues (20)
- [OTHER] Improve internal safety comments and architecture
- [BUG] Unsoundness: `try_parse_{4,8}digits` appear to advance iterators out of bounds
- [BUG] Unsoundness in `Bytes::read()` HOT 1
- [BUG] BytesIter should be an `unsafe trait` or private
- [BUG] Bounds for integer parsing are not correctly checked HOT 1
- [FEATURE] Update Dragonbox Algorithm HOT 2
- [BUG] `umul192_lower128` can error on due to overflow on addition
- [FEATURE] Add thousands digit separator for ```WriteIntegerOptions``` to use with ```to_string_with_options```
- parse_partial ignoring minus sign in presence of trailing characters HOT 3
- [BUG] Assertion failure on parsing hexadecimal floats HOT 1
- [BUG] Tests fail to compile because quickcheck is missing from Cargo.toml in the crates.io tarball. HOT 4
- [QUESTION] Use of min_significant_digits with max_significant digits
- [BUG] Integer overflow checking logic is incorrect
- [FEATURE] `write` APIs should take `buffer: &mut [MaybeUninit<u8>]`
- [QUESTION] support custom types (i256)
- [BUG] -0.0 printed as "0.0" HOT 1
- [BUG] Safety comments for MaybeUninit::assume_init calls are wrong, calls are UB
- [BUG] consecutive_digit_separator has no effect
- [BUG] Inconsistent error between int and float parsing
- [BUG] `no_integer_leading_zeros(true)` incorrectly parses input
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-lexical.