commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
a65021985337133ebb617eeeb90637bf326a41c8
Alex Huszagh
2021-08-30T00:39:49
Initial implementation for base prefix/suffix support.
diff --git a/lexical-parse-float/src/parse.rs b/lexical-parse-float/src/parse.rs index b9c080f..fa2a7ff 100644 --- a/lexical-parse-float/src/parse.rs +++ b/lexical-parse-float/src/parse.rs @@ -384,6 +384,31 @@ pub fn parse_partial_number<'a, const FORMAT: u128>( // INTEGER + // Check to see if we have a val...
2
101
14
8122d1096bc70aad8121697b9ba743d27992d15a
Alex Huszagh
2021-08-29T07:21:50
Added tests to ensure all format flags work.
diff --git a/lexical-util/tests/feature_format_tests.rs b/lexical-util/tests/feature_format_tests.rs index a047016..ad64599 100644 --- a/lexical-util/tests/feature_format_tests.rs +++ b/lexical-util/tests/feature_format_tests.rs @@ -1,5 +1,6 @@ #![cfg(feature = "format")] +use core::num; use lexical_util::format; ...
1
62
31
ff19e6b6501fc1058015f4604652e0d33b4dd62e
Alex Huszagh
2021-08-26T18:33:32
Deduplicate more code.
diff --git a/lexical-benchmark/algorithm/division.rs b/lexical-benchmark/algorithm/division.rs index 5ae8770..a58412a 100644 --- a/lexical-benchmark/algorithm/division.rs +++ b/lexical-benchmark/algorithm/division.rs @@ -8,12 +8,28 @@ const COUNT: usize = 1000; // ALGORITHMS +// Compiles to: +// example::normal_d...
6
42
74
745f3fadc4a85cfb4bc6e36ebb39d18e5ac102cc
Alex Huszagh
2021-08-26T17:03:29
Deduplicate some code.
diff --git a/lexical-write-float/src/algorithm.rs b/lexical-write-float/src/algorithm.rs index ce23bc8..fc46c10 100644 --- a/lexical-write-float/src/algorithm.rs +++ b/lexical-write-float/src/algorithm.rs @@ -28,7 +28,7 @@ use crate::float::{ExtendedFloat80, RawFloat}; use crate::options::{Options, RoundMode}; -use...
3
25
29
48687d1befeeae151451ac8f5044dcdc2d765ac8
Alex Huszagh
2021-08-26T16:56:32
Added algorithm benchmarks.
diff --git a/lexical-benchmark/algorithm/Cargo.toml b/lexical-benchmark/algorithm/Cargo.toml index 17efb7f..893db6f 100644 --- a/lexical-benchmark/algorithm/Cargo.toml +++ b/lexical-benchmark/algorithm/Cargo.toml @@ -10,13 +10,18 @@ path = "../../lexical-util" default-features = false features = [] +[dependencies.l...
8
266
17
a7bb0d2a1ef9491d26b21439d5976a276087a465
Alex Huszagh
2021-08-26T16:12:16
Deduplicate benchmark code.
diff --git a/lexical-benchmark/input.rs b/lexical-benchmark/input.rs index a5da9d7..b6b61fb 100644 --- a/lexical-benchmark/input.rs +++ b/lexical-benchmark/input.rs @@ -3,6 +3,8 @@ #![allow(dead_code, unused_macros)] +use core::fmt::Debug; +use core::str::FromStr; use fastrand::Rng; #[cfg(feature = "floats")] u...
15
344
639
4e8330b1a3630daa398e894a399efd49e478b234
Alex Huszagh
2021-08-25T23:08:58
Added fuzz targets for writing floats.
diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index 97edd4e..9c121e4 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -132,6 +132,14 @@ path = "fuzz_targets/parse-float-f32.rs" name = "parse-float-f64" path = "fuzz_targets/parse-float-f64.rs" +[[bin]] +name = "write-float-f32" +path = "fuzz_targets/write-floa...
5
69
12
f24a46101fce73c577ac4a4a77faea5e454b0491
Alex Huszagh
2021-08-25T21:58:39
Finished the dragonbox implementation.
diff --git a/lexical-write-float/src/algorithm.rs b/lexical-write-float/src/algorithm.rs index 9ab386a..b6e0a31 100644 --- a/lexical-write-float/src/algorithm.rs +++ b/lexical-write-float/src/algorithm.rs @@ -9,23 +9,32 @@ //! We use a u64 for the significant digits, even for a 32-bit integer, //! however, we use the...
7
512
124
a284e9a9cd8d213feaefb45203b370a14ced9f8b
Alex Huszagh
2021-08-25T18:28:15
Added negative exponent writer.
diff --git a/lexical-write-float/src/algorithm.rs b/lexical-write-float/src/algorithm.rs index 6c602b0..9ab386a 100644 --- a/lexical-write-float/src/algorithm.rs +++ b/lexical-write-float/src/algorithm.rs @@ -78,7 +78,7 @@ pub unsafe fn write_float_scientific<F: DragonboxFloat, const FORMAT: u128>( assert!(format....
5
171
32
192c40289364f07d931c4717fef9e0e152b22858
Alex Huszagh
2021-08-25T17:32:42
Implemented write_digit algorithms for dragonbox.
diff --git a/lexical-write-float/src/algorithm.rs b/lexical-write-float/src/algorithm.rs index 2e6b260..6c602b0 100644 --- a/lexical-write-float/src/algorithm.rs +++ b/lexical-write-float/src/algorithm.rs @@ -15,13 +15,16 @@ use crate::float::{ExtendedFloat80, RawFloat}; use crate::options::{Options, RoundMode}; +u...
6
687
178
21f922e15334c5d59147366c2d1c78dbff1a8d9d
Alex Huszagh
2021-08-24T22:34:02
Added comments for the dragonbox tables.
diff --git a/lexical-write-float/src/table_dragonbox.rs b/lexical-write-float/src/table_dragonbox.rs index 0413cc8..456e9b9 100644 --- a/lexical-write-float/src/table_dragonbox.rs +++ b/lexical-write-float/src/table_dragonbox.rs @@ -23,84 +23,84 @@ pub const N64_POWERS_OF_FIVE: usize = (LARGEST_F64_POW5 - SMALLEST_F64_...
1
78
78
af4a7682ec909451112290dd5f38215c8d7c8cd1
Alex Huszagh
2021-08-22T04:48:03
Bug fixes for 32-bit architectures.
diff --git a/lexical-parse-float/src/bigint.rs b/lexical-parse-float/src/bigint.rs index abaffb2..ce193b5 100644 --- a/lexical-parse-float/src/bigint.rs +++ b/lexical-parse-float/src/bigint.rs @@ -718,7 +718,7 @@ impl<'a, T> ops::Index<usize> for ReverseView<'a, T> { /// Safe as long as `rindex < x.len()`. #[inline] ...
8
27
22
37669878dba7740e5d176be55a2cd6071fcf9ca8
Alex Huszagh
2021-08-22T01:41:32
Added two more unittest cases from fast_float.
diff --git a/lexical-parse-float/tests/api_tests.rs b/lexical-parse-float/tests/api_tests.rs index e70344f..a7433fb 100644 --- a/lexical-parse-float/tests/api_tests.rs +++ b/lexical-parse-float/tests/api_tests.rs @@ -304,6 +304,9 @@ fn parse_f32_test() { // Errors identified via test-parse-random. assert_eq!(...
1
6
0
929e43fb05be8db250cc45e87bfdefaec7c97d80
Alex Huszagh
2021-08-21T20:09:49
Fixed rare bug where max_digits could be overriden by mult-digit optimizations.
diff --git a/lexical-parse-float/src/bigint.rs b/lexical-parse-float/src/bigint.rs index 22d556c..abaffb2 100644 --- a/lexical-parse-float/src/bigint.rs +++ b/lexical-parse-float/src/bigint.rs @@ -996,7 +996,7 @@ fn large_add_from<const SIZE: usize>( if y.len() > x.len().saturating_sub(start) { // Ensure ...
3
33
33
f9b7d8aefdbc8c4debf75610c64f5c0b4be05513
Alex Huszagh
2021-08-20T22:56:55
Formatting issues.
diff --git a/lexical-parse-float/src/bigint.rs b/lexical-parse-float/src/bigint.rs index 84d2459..22d556c 100644 --- a/lexical-parse-float/src/bigint.rs +++ b/lexical-parse-float/src/bigint.rs @@ -938,7 +938,11 @@ pub fn scalar_mul(x: Limb, y: Limb, carry: Limb) -> (Limb, Limb) { /// Add small integer to bigint star...
1
10
2
b85b9a94c229ce4a5577a89e52bd66208931a41c
Alex Huszagh
2021-08-20T22:54:52
Ensure to propagate option errors.
diff --git a/lexical-parse-float/src/bigint.rs b/lexical-parse-float/src/bigint.rs index f92a0cc..84d2459 100644 --- a/lexical-parse-float/src/bigint.rs +++ b/lexical-parse-float/src/bigint.rs @@ -89,14 +89,15 @@ impl Bigint { /// Multiply and assign as if by exponentiation by a power. #[inline] - pub fn...
2
52
45
502f83750b1a4bd0a6b47e0852e6d0184489de0c
Alex Huszagh
2021-08-20T20:00:36
Updated the explicit exponent limit to ensure INVALID_FP is of larger magnitude.
diff --git a/lexical-parse-float/src/parse.rs b/lexical-parse-float/src/parse.rs index e00661f..49c5b8d 100644 --- a/lexical-parse-float/src/parse.rs +++ b/lexical-parse-float/src/parse.rs @@ -475,7 +475,7 @@ pub fn parse_partial_number<'a, const FORMAT: u128>( let before = byte.current_count(); par...
1
1
1
0ae6d068e0355f4ef9bb8444645d429fae76e0c5
Alex Huszagh
2021-08-20T17:28:28
Fix docs to build on stable.
diff --git a/lexical-core/src/lib.rs b/lexical-core/src/lib.rs index 7ca63a3..1e32ce0 100644 --- a/lexical-core/src/lib.rs +++ b/lexical-core/src/lib.rs @@ -288,56 +288,23 @@ //! //! # Algorithms //! -#![cfg_attr( - feature = "parse-floats", - doc = " - [Parsing Floats](lexical_parse_float#algorithm-approach)"...
5
31
101
67cd5a681d691d33d19f1ea3c0d2a27253958cdc
Alex Huszagh
2021-08-20T17:18:01
Updated doc comments to work on stable.
diff --git a/lexical-core/Cargo.toml b/lexical-core/Cargo.toml index 7bffc58..5760c12 100644 --- a/lexical-core/Cargo.toml +++ b/lexical-core/Cargo.toml @@ -12,6 +12,7 @@ repository = "https://github.com/Alexhuszagh/rust-lexical-experimental" version = "0.1.0" exclude = [ "assets/*", + "etc/*", "cargo-ti...
12
92
15
0fac3322738bf413e14232dd3d6d928a3b2ffde7
Alex Huszagh
2021-08-20T16:33:31
Added additional fuzz targets.
diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index b08abbb..97edd4e 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -13,11 +13,21 @@ path = "../lexical-util" default-features = false features = [] +[dependencies.lexical-parse-float] +path = "../lexical-parse-float" +default-features = false +features = [] +...
3
64
4
af2e9fb134a0d1f646b16ff09be61a7269b3c8ba
Alex Huszagh
2021-08-19T23:07:35
Major optimizations for slow-path algorithms.
diff --git a/lexical-benchmark/parse-float/contrived.rs b/lexical-benchmark/parse-float/contrived.rs index c0a0604..f298c40 100644 --- a/lexical-benchmark/parse-float/contrived.rs +++ b/lexical-benchmark/parse-float/contrived.rs @@ -59,34 +59,34 @@ macro_rules! bench { }; } -bench!(fast, "fast", [FAST_PATH].ite...
3
44
36
fda748bec1a5d6a8197b90c64b7c1f93434f436c
Alex Huszagh
2021-08-19T15:46:05
Remove most fast-path pessimizations.
diff --git a/lexical-parse-float/src/parse.rs b/lexical-parse-float/src/parse.rs index 50cd84b..5ebf27f 100644 --- a/lexical-parse-float/src/parse.rs +++ b/lexical-parse-float/src/parse.rs @@ -341,14 +341,16 @@ pub fn parse_partial_number<'a, const FORMAT: u128>( options: &Options, ) -> Result<(Number<'a>, usize)...
4
16
19
c4342a3b5a17bb1a4654f58bc1c9372138b77988
Alex Huszagh
2021-08-19T06:43:14
Updated slow path algorithms to use Number. - byte_comp now uses Number - Removed digit checking algorithms, since they're now redundant. - Added 8-digit optimizations for truncated values.
diff --git a/lexical-parse-float/src/parse.rs b/lexical-parse-float/src/parse.rs index e7dfccd..50cd84b 100644 --- a/lexical-parse-float/src/parse.rs +++ b/lexical-parse-float/src/parse.rs @@ -186,7 +186,7 @@ pub fn parse_complete<F: LemireFloat, const FORMAT: u128>( debug_assert!(!options.lossy()); /...
5
133
71
fdfebe2879921c214ae3b29afcd36b1ab74f800d
Alex Huszagh
2021-08-18T22:56:40
Added slice positions to number.
diff --git a/lexical-parse-float/src/number.rs b/lexical-parse-float/src/number.rs index 3bd7e8f..5759d20 100644 --- a/lexical-parse-float/src/number.rs +++ b/lexical-parse-float/src/number.rs @@ -17,7 +17,7 @@ use lexical_util::format::NumberFormat; /// radix are the same, since we need to be able to move powers in a...
4
34
10
55da00c37734a415cc1ed8e32afcaf8c685d90ab
Alex Huszagh
2021-08-17T20:51:50
Add a few more benchmark cases.
diff --git a/lexical-benchmark/parse-float/contrived.rs b/lexical-benchmark/parse-float/contrived.rs index 6389b20..336bdd1 100644 --- a/lexical-benchmark/parse-float/contrived.rs +++ b/lexical-benchmark/parse-float/contrived.rs @@ -41,8 +41,12 @@ const MODERATE_PATH: &str = "9007199254740992.0"; const HALFWAY: &str =...
1
8
0
fbaaa2368081cdfb06101627f4e833beda22494f
Alex Huszagh
2021-08-17T20:35:28
Bug fix in the pow implementation.
diff --git a/lexical-parse-float/src/bigint.rs b/lexical-parse-float/src/bigint.rs index 4b51b56..44f9ed1 100644 --- a/lexical-parse-float/src/bigint.rs +++ b/lexical-parse-float/src/bigint.rs @@ -592,6 +592,7 @@ impl<const SIZE: usize> StackVec<SIZE> { /// Warning: This is not a general-purpose division algorithm...
5
62
260
4f44f51cc0f9fde5eefa5e611efd876dd090f3f5
Alex Huszagh
2021-08-17T19:42:36
Added contrived benchmarks.
diff --git a/lexical-benchmark/parse-float/Cargo.toml b/lexical-benchmark/parse-float/Cargo.toml index 46a5cd8..42d1e3b 100644 --- a/lexical-benchmark/parse-float/Cargo.toml +++ b/lexical-benchmark/parse-float/Cargo.toml @@ -25,6 +25,11 @@ name = "canada" path = "canada.rs" harness = false +[[bench]] +name = "contr...
2
78
0
0a1239390d76b16cd0c482fdb4e67f82465678f1
Alex Huszagh
2021-08-17T19:23:50
Minor documentation updates.
diff --git a/lexical-parse-float/src/bigint.rs b/lexical-parse-float/src/bigint.rs index f877027..4b51b56 100644 --- a/lexical-parse-float/src/bigint.rs +++ b/lexical-parse-float/src/bigint.rs @@ -2,6 +2,8 @@ //! //! This includes minimal stackvector for use in big-integer arithmetic. +#![doc(hidden)] + #[cfg(feat...
5
13
8
3e14b4f6d37d08d53e72ef7cf630f899debbb9c8
Alex Huszagh
2021-08-17T19:15:07
Added unittests for parse float.
diff --git a/lexical-benchmark/parse-float/canada.rs b/lexical-benchmark/parse-float/canada.rs index da0f5d9..f21c425 100644 --- a/lexical-benchmark/parse-float/canada.rs +++ b/lexical-benchmark/parse-float/canada.rs @@ -1 +1,2 @@ -pub fn main() {} +pub fn main() { +} diff --git a/lexical-benchmark/parse-float/json.rs ...
7
254
20
f65bb7bb6036316d94158ddc1fda05d76d39d1e9
Alex Huszagh
2021-08-17T18:27:17
Added updated benchmarks for pow.
diff --git a/lexical-benchmark/parse-float/Cargo.toml b/lexical-benchmark/parse-float/Cargo.toml index aa338ab..46a5cd8 100644 --- a/lexical-benchmark/parse-float/Cargo.toml +++ b/lexical-benchmark/parse-float/Cargo.toml @@ -21,6 +21,16 @@ power-of-two = ["lexical-parse-float/power-of-two"] format = ["lexical-parse-fl...
6
29
7
9614ce2aa0f535db518e86747b58287e10579cb9
Alex Huszagh
2021-08-17T17:47:49
Bug fixes without the radix feature.
diff --git a/lexical-benchmark/parse-float/Cargo.toml b/lexical-benchmark/parse-float/Cargo.toml index 76c0900..aa338ab 100644 --- a/lexical-benchmark/parse-float/Cargo.toml +++ b/lexical-benchmark/parse-float/Cargo.toml @@ -12,6 +12,7 @@ features = [] [dev-dependencies] criterion = { version = "0.3", features = ["...
6
73
117
c3a223c6383a7c52b65bd4c624466af3267c66b5
Alex Huszagh
2021-08-17T17:10:34
Finished unittests for slow path algorithms.
diff --git a/lexical-parse-float/src/bigint.rs b/lexical-parse-float/src/bigint.rs index e2aa20b..6cd22f3 100644 --- a/lexical-parse-float/src/bigint.rs +++ b/lexical-parse-float/src/bigint.rs @@ -1236,15 +1236,22 @@ pub unsafe fn karatsuba_uneven_mul<const SIZE: usize>( /// Multiply bigint by bigint using grade-schoo...
4
270
8
2691fa3252ca4b399dbf6e9776926a68aeb30b3f
Alex Huszagh
2021-08-17T15:27:10
Added unittests for slow path.
diff --git a/lexical-parse-float/src/bigint.rs b/lexical-parse-float/src/bigint.rs index 7984ad3..e2aa20b 100644 --- a/lexical-parse-float/src/bigint.rs +++ b/lexical-parse-float/src/bigint.rs @@ -200,8 +200,7 @@ impl Bigfloat { /// Shift-left the entire buffer n limbs. #[inline] pub fn shl_limbs(&mut se...
4
365
53
1b6aef50cec0d4422735ee1fd53cda8776f3d13e
Alex Huszagh
2021-08-17T04:01:22
Added enhanced unittesting for float parsing.
diff --git a/lexical-parse-float/src/bigint.rs b/lexical-parse-float/src/bigint.rs index 939f12e..7984ad3 100644 --- a/lexical-parse-float/src/bigint.rs +++ b/lexical-parse-float/src/bigint.rs @@ -93,7 +93,7 @@ impl Bigint { pow::<BIGINT_LIMBS>(&mut self.data, odd, exp) } if shift != 0 { ...
8
290
9
30710c9bf7e784764d4f1e4c7630a93e0e0763c0
Alex Huszagh
2021-08-13T22:32:54
Added slow algorithm for binary.
diff --git a/lexical-parse-float/src/binary.rs b/lexical-parse-float/src/binary.rs index 37ed478..63e072d 100644 --- a/lexical-parse-float/src/binary.rs +++ b/lexical-parse-float/src/binary.rs @@ -10,16 +10,20 @@ use crate::float::{ExtendedFloat80, RawFloat}; use crate::mask::lower_n_halfway; use crate::number::Numb...
4
210
16
2f2189f481c3db0513cff42b1403b6451baf9b2c
Alex Huszagh
2021-08-13T15:12:52
Added unittesting for radixes.
diff --git a/lexical-parse-float/src/parse.rs b/lexical-parse-float/src/parse.rs index 30b26d4..acc27e5 100644 --- a/lexical-parse-float/src/parse.rs +++ b/lexical-parse-float/src/parse.rs @@ -145,6 +145,22 @@ macro_rules! parse_number { }}; } +/// Parse a hexadecimal float representation +macro_rules! parse_he...
5
125
82
a90ce80297f51bebf184cdca0ff557a7c7e23897
Alex Huszagh
2021-08-13T01:33:37
Added stub for slow paths.
diff --git a/lexical-parse-float/src/parse.rs b/lexical-parse-float/src/parse.rs index b4bcd90..30b26d4 100644 --- a/lexical-parse-float/src/parse.rs +++ b/lexical-parse-float/src/parse.rs @@ -174,7 +174,7 @@ pub fn parse_complete<F: LemireFloat, const FORMAT: u128>( // Parse our a small representation of our numb...
1
20
4
3902914cc6b15f580e251870d0b149cdab7dea99
Alex Huszagh
2021-08-13T00:57:41
Added initial implementation for binary floats.
diff --git a/lexical-parse-float/src/bellerophon.rs b/lexical-parse-float/src/bellerophon.rs index 0269f48..4b12a25 100644 --- a/lexical-parse-float/src/bellerophon.rs +++ b/lexical-parse-float/src/bellerophon.rs @@ -18,6 +18,7 @@ #![doc(hidden)] use crate::float::{ExtendedFloat80, RawFloat}; +use crate::mask::{low...
10
401
125
6b6d45d15767b0fdd2610b1c214028ca88ae6856
Alex Huszagh
2021-08-12T05:19:29
Deduplicated a lot of write float code.
diff --git a/lexical-parse-float/src/bellerophon.rs b/lexical-parse-float/src/bellerophon.rs index 9bd541a..85a9c0c 100644 --- a/lexical-parse-float/src/bellerophon.rs +++ b/lexical-parse-float/src/bellerophon.rs @@ -1,4 +1,34 @@ +//! An implementation of Clinger's Bellerophon algorithm. +//! +//! This is a moderate pa...
9
316
296
7975b0c334ce40cef31a5ce62bce5bf97d4af09d
Alex Huszagh
2021-08-12T00:57:35
Added pre-defined options constants.
diff --git a/lexical-parse-float/src/options.rs b/lexical-parse-float/src/options.rs index fa2826d..3a09acc 100644 --- a/lexical-parse-float/src/options.rs +++ b/lexical-parse-float/src/options.rs @@ -537,7 +537,114 @@ pub const CARAT_EXPONENT: Options = unsafe { }; const_assert!(CARAT_EXPONENT.is_valid()); -// TOD...
4
1,355
13
1291677b874ed9cc2fe53d3272547fdbfebd4c1b
Alex Huszagh
2021-08-11T17:35:27
Remove decimal point and exponent from NumberFormat.
diff --git a/lexical-parse-float/src/parse.rs b/lexical-parse-float/src/parse.rs index e75406b..2ae2a21 100644 --- a/lexical-parse-float/src/parse.rs +++ b/lexical-parse-float/src/parse.rs @@ -98,7 +98,7 @@ pub fn parse_complete<F: LemireFloat, const FORMAT: u128>( // Can only do fast and moderate path optimizatio...
12
28
323
5dbd07c9043bc5e24458b08aadbc3e526c20cce7
Alex Huszagh
2021-08-11T04:18:25
Bug fixes for lifetimes.
diff --git a/lexical-parse-float/src/parse.rs b/lexical-parse-float/src/parse.rs index 5654a90..6e98f3a 100644 --- a/lexical-parse-float/src/parse.rs +++ b/lexical-parse-float/src/parse.rs @@ -8,10 +8,9 @@ use crate::float::LemireFloat; use crate::number::Number; use crate::options::Options; -use lexical_util::digit...
2
48
69
5c24db70fd34e34629b824e7f5a2341bcd95ea61
Alex Huszagh
2021-08-11T01:57:58
Lifetime hell.
diff --git a/lexical-parse-float/src/parse.rs b/lexical-parse-float/src/parse.rs index f45a8f6..3a8a8fb 100644 --- a/lexical-parse-float/src/parse.rs +++ b/lexical-parse-float/src/parse.rs @@ -1,29 +1,34 @@ //! Shared trait and methods for parsing floats. +//! +//! This is adapted from [fast-float-rust](https://github...
5
436
68
a8e6a133fe1e1da0e537dc40ac184c43201a2aea
Alex Huszagh
2021-08-10T16:09:33
Added hex floats and documentation updates. - Added hex floats for pre-defined formats. - Fixed conditional compilation for module-level docs.
diff --git a/lexical-core/src/lib.rs b/lexical-core/src/lib.rs index b250d54..a999be4 100644 --- a/lexical-core/src/lib.rs +++ b/lexical-core/src/lib.rs @@ -80,17 +80,17 @@ //! //! **To String** //! -//! - [`write`] -//! - [`write_unchecked`] -//! - [`write_with_options`] -//! - [`write_with_options_unchecked`] +#![...
8
684
41
4e98db50dbc6cd623e91240a1544d173590b4fbb
Alex Huszagh
2021-08-10T15:05:58
Added bug fixes for hex floats and unittests.
diff --git a/lexical-write-float/src/hex.rs b/lexical-write-float/src/hex.rs index d2553ca..b40f0fd 100644 --- a/lexical-write-float/src/hex.rs +++ b/lexical-write-float/src/hex.rs @@ -1,10 +1,26 @@ //! Optimized float serializer for hexadecimal floats. +//! +//! This actually works for any case where we can exactly r...
3
406
20
dd14eec9144280f2346a0b9ee1fba53eccce25c5
Alex Huszagh
2021-08-10T06:29:51
Initial dummy commit for hex float support.
diff --git a/lexical-core/src/lib.rs b/lexical-core/src/lib.rs index 4873c4c..b250d54 100644 --- a/lexical-core/src/lib.rs +++ b/lexical-core/src/lib.rs @@ -329,6 +329,11 @@ #![cfg_attr(feature = "lint", warn(unsafe_op_in_unsafe_fn))] #![cfg_attr(not(feature = "std"), no_std)] +#[cfg(feature = "parse-floats")] +use...
17
798
27
4d65254a71b8a727e17aa3650b51fce2883f5ba9
Alex Huszagh
2021-08-09T19:41:54
Minor documentation updates.
diff --git a/lexical-write-float/src/options.rs b/lexical-write-float/src/options.rs index 134fd02..5a60ad3 100644 --- a/lexical-write-float/src/options.rs +++ b/lexical-write-float/src/options.rs @@ -39,6 +39,10 @@ pub struct OptionsBuilder { max_significant_digits: OptionUsize, /// Minimum number of signifi...
1
4
0
98816acf38d5fb4333448d28579b79e0b5dbc4cf
Alex Huszagh
2021-08-09T06:31:06
Documentation updates.
diff --git a/lexical-parse-float/src/lib.rs b/lexical-parse-float/src/lib.rs index 109e550..d875a99 100644 --- a/lexical-parse-float/src/lib.rs +++ b/lexical-parse-float/src/lib.rs @@ -5,3 +5,8 @@ #![allow(unused_unsafe)] #![cfg_attr(feature = "lint", warn(unsafe_op_in_unsafe_fn))] #![cfg_attr(not(feature = "std"), ...
37
243
108
c858a0ee9ed841a1d95f55eaf746f8c87e25f7bc
Alex Huszagh
2021-08-07T18:01:14
Added better documentation and code formatting.
diff --git a/lexical-write-float/src/compact.rs b/lexical-write-float/src/compact.rs index d91814f..2b09b0a 100644 --- a/lexical-write-float/src/compact.rs +++ b/lexical-write-float/src/compact.rs @@ -5,10 +5,20 @@ //! //! In addition to porting from C to Rust, this also adds format //! precision control and other f...
4
436
393
6846a1929c89726fdb085ea66a3555441d32653d
Alex Huszagh
2021-08-02T23:03:50
Added unittests for write float options.
diff --git a/lexical-util/tests/format_builder_tests.rs b/lexical-util/tests/format_builder_tests.rs index 004ea5e..6508e85 100644 --- a/lexical-util/tests/format_builder_tests.rs +++ b/lexical-util/tests/format_builder_tests.rs @@ -1,4 +1,6 @@ -use lexical_util::format::{self, NumberFormat, NumberFormatBuilder}; +#[cf...
4
89
3
63231164087204cc6c20d6aa6473640cc2c91440
Alex Huszagh
2021-08-02T21:23:12
Added more unittests for format.
diff --git a/lexical-parse-integer/src/options.rs b/lexical-parse-integer/src/options.rs index 3ebf432..013befc 100644 --- a/lexical-parse-integer/src/options.rs +++ b/lexical-parse-integer/src/options.rs @@ -85,7 +85,7 @@ impl Options { /// Create OptionsBuilder using existing values. #[inline(always)] - ...
11
439
450
ce58fa08b0573de16810e8aaae4621ae15a7971c
Alex Huszagh
2021-08-01T20:25:47
Updated options API.
diff --git a/lexical-parse-integer/src/options.rs b/lexical-parse-integer/src/options.rs index 9339013..6d504d9 100644 --- a/lexical-parse-integer/src/options.rs +++ b/lexical-parse-integer/src/options.rs @@ -1,7 +1,6 @@ //! Configuration options for parsing integers. -// TODO(ahuszagh) Should add a builder trait at...
4
29
10
bf44c465c669754de12e15e3df66c0d8ac911398
Alex Huszagh
2021-08-01T19:46:01
Finished the remaining formats.
diff --git a/lexical-util/src/feature_format.rs b/lexical-util/src/feature_format.rs index ff0ba20..6c5ee20 100644 --- a/lexical-util/src/feature_format.rs +++ b/lexical-util/src/feature_format.rs @@ -1297,6 +1297,7 @@ pub const PYTHON36_LITERAL: u128 = NumberFormatBuilder::new() .digit_separator(num::NonZeroU8::n...
1
819
663
5d0793ea5a41352ff82e2ab7ef0aa5bd44b0f0e7
Alex Huszagh
2021-07-31T21:40:52
Initial implementations of 128-bit optimizations.
diff --git a/lexical-parse-integer/src/algorithmv2.rs b/lexical-parse-integer/src/algorithmv2.rs new file mode 100644 index 0000000..a78c1d5 --- /dev/null +++ b/lexical-parse-integer/src/algorithmv2.rs @@ -0,0 +1,60 @@ +// TODO(ahuszagh) Rename to algorithm +#![cfg(not(feature = "compact"))] + +use lexical_util::digit:...
11
222
127
3129478b7f8c6fbef5cf83faab3509c53dc79c7d
Alex Huszagh
2021-07-31T17:17:59
Initial commit wth performant integer parser.
diff --git a/lexical-parse-integer/src/api.rs b/lexical-parse-integer/src/api.rs index 8025d56..eb9efa9 100644 --- a/lexical-parse-integer/src/api.rs +++ b/lexical-parse-integer/src/api.rs @@ -1,72 +1,83 @@ ////! Implements the algorithm in terms of the lexical API. -// -//use crate::options::Options; -//use crate::pa...
9
809
385
7ba96436d8dc05bacc23ad0c704ff4c2eb69d37d
Alex Huszagh
2021-07-28T20:25:29
Bad benchmark results :'(
diff --git a/lexical-parse-integer/src/algorithm.rs b/lexical-parse-integer/src/algorithm.rs index 22ed834..bc93e1a 100644 --- a/lexical-parse-integer/src/algorithm.rs +++ b/lexical-parse-integer/src/algorithm.rs @@ -95,19 +95,20 @@ macro_rules! parse_digits { let mut value = <$t>::ZERO; let radix = N...
4
75
52
83024a29e9e4fb1e1584a5c9c99f87f613f35dd7
Alex Huszagh
2021-07-28T17:38:57
Added initial benchmarks.
diff --git a/lexical-benchmark/parse-integer/Cargo.toml b/lexical-benchmark/parse-integer/Cargo.toml index 9ab3b26..de3d9b0 100644 --- a/lexical-benchmark/parse-integer/Cargo.toml +++ b/lexical-benchmark/parse-integer/Cargo.toml @@ -5,6 +5,11 @@ authors = ["Alex Huszagh <ahuszagh@gmail.com>"] edition = "2018" publish...
13
551
73
ce46eff828bce7ac6879a67eb300bbd542daeed4
Alex Huszagh
2021-07-27T00:35:46
Updated skip parsing algorithms.
diff --git a/lexical-parse-integer/src/algorithm.rs b/lexical-parse-integer/src/algorithm.rs index bed28cb..a62b099 100644 --- a/lexical-parse-integer/src/algorithm.rs +++ b/lexical-parse-integer/src/algorithm.rs @@ -2,16 +2,16 @@ use lexical_util::assert::debug_assert_radix; use lexical_util::digit::char_to_digit_...
11
612
392
28b9a0bd79141c867b9c47ee088f84286520ef23
Alex Huszagh
2021-07-26T04:43:47
Dummy initial commit for format support.
diff --git a/lexical-parse-integer/src/algorithm.rs b/lexical-parse-integer/src/algorithm.rs index 7cd9de1..b4a22ab 100644 --- a/lexical-parse-integer/src/algorithm.rs +++ b/lexical-parse-integer/src/algorithm.rs @@ -3,7 +3,7 @@ use lexical_util::assert::debug_assert_radix; use lexical_util::div128::u64_step; use le...
5
516
408
5cbfd41ad9991bd75885094855723cfc6eb4134d
Alex Huszagh
2021-07-25T21:19:59
Minor formatting changes.
diff --git a/lexical-util/src/api.rs b/lexical-util/src/api.rs index 9f93e38..7302f3f 100644 --- a/lexical-util/src/api.rs +++ b/lexical-util/src/api.rs @@ -190,6 +190,6 @@ macro_rules! to_lexical_with_options { bytes: &'a mut [u8], options: &Self::Options, ) -> &'a mut [u...
3
13
6
9777bcc2114cdd083bfa0b5f9efe8456556f6bf5
Alex Huszagh
2021-07-23T22:48:53
Fix formatting/safety docs.
diff --git a/lexical_benchmark/write_integer/random.rs b/lexical_benchmark/write_integer/random.rs index 9f5e6bb..6d5610f 100644 --- a/lexical_benchmark/write_integer/random.rs +++ b/lexical_benchmark/write_integer/random.rs @@ -154,7 +154,9 @@ macro_rules! itoa_generator { $data.iter().for_each(|&x| {...
6
35
18
1b86530b9c90eca1994f7135b032023f8dd210d4
Alex Huszagh
2021-07-22T06:46:19
Added traits for lexical conversion routines.
diff --git a/lexical_util/Cargo.toml b/lexical_util/Cargo.toml index 9326424..51864c1 100644 --- a/lexical_util/Cargo.toml +++ b/lexical_util/Cargo.toml @@ -12,6 +12,7 @@ repository = "https://github.com/Alexhuszagh/rust-lexical-experimental" version = "0.1.0" [dependencies] +cfg-if = "1.0" libm = "0.2.1" static_...
5
129
2
e78ca822baa960f11e6c926c5d464080f4ea21d8
Alex Huszagh
2021-07-22T04:40:18
Added generic algorithm for writing integers.
diff --git a/lexical_util/Cargo.toml b/lexical_util/Cargo.toml index ed50561..9326424 100644 --- a/lexical_util/Cargo.toml +++ b/lexical_util/Cargo.toml @@ -15,6 +15,10 @@ version = "0.1.0" libm = "0.2.1" static_assertions = "1" +[dev-dependencies] +quickcheck = "1.0.3" +proptest = "0.10.1" + [features] default =...
11
955
18
95d073795bc61ed11179fa39078f72d2a86e3458
Alex Huszagh
2021-07-22T02:48:38
Minor improvements for writing integers.
diff --git a/lexical_util/Cargo.toml b/lexical_util/Cargo.toml index af59172..ed50561 100644 --- a/lexical_util/Cargo.toml +++ b/lexical_util/Cargo.toml @@ -19,6 +19,10 @@ static_assertions = "1" default = ["std"] # Use the standard library. std = [] +# Add support for writing power-of-two integer strings. +power_of...
6
608
48
3cccda29558eb5795e109e849cb90c857a0999ea
Alex Huszagh
2021-05-11T02:17:58
Finished the last elements for the options API.
diff --git a/lexical-core/src/options/config.rs b/lexical-core/src/options/config.rs new file mode 100644 index 0000000..40d055f --- /dev/null +++ b/lexical-core/src/options/config.rs @@ -0,0 +1,37 @@ +//! Default values for the options API. + +use crate::util::*; // only need misc, change to this +use crate::lib::{mem...
11
1,327
14
82f8ba6a308fea9c85285bf120550a3de3524e65
Alex Huszagh
2021-05-08T19:06:48
Simplified the trait system further.
diff --git a/lexical-core/src/atof/algorithm/lemire.rs b/lexical-core/src/atof/algorithm/lemire.rs index 4bac543..1a1f06f 100644 --- a/lexical-core/src/atof/algorithm/lemire.rs +++ b/lexical-core/src/atof/algorithm/lemire.rs @@ -93,7 +93,7 @@ fn round_upward<M>(mut mantissa: M, is_truncated: bool) -> M where M: U...
3
6
89
86185366614f9dcaa87fcf3ead89e517258c16cb
Alex Huszagh
2021-05-08T15:25:56
Finished an initial draft of NumberFormat v2.
diff --git a/lexical-core/src/lib.rs b/lexical-core/src/lib.rs index e4f3b56..0d06ad6 100644 --- a/lexical-core/src/lib.rs +++ b/lexical-core/src/lib.rs @@ -237,7 +237,7 @@ pub(crate) mod lib { #[macro_use] mod util; //#[macro_use] -//mod options; // TODO(ahuszagh) Finish re-working. +mod options; // TODO(ahuszagh)...
12
625
124
4c4e7c0e0b9b37db8f5d12ebe4a7b7eff5b5be66
Alex Huszagh
2021-05-05T22:39:15
Added comparison to parse.
diff --git a/Cargo.toml b/Cargo.toml index 1f14bc3..6d43ef4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -148,8 +148,12 @@ path = "data/test-parse-unittests/main.rs" required-features = ["comprehensive_float_test"] [[bin]] -name = "simple_example" -path = "bin/simple_example.rs" +name = "simple_lexical_example" +pat...
4
18
7
9eeece66863b361719166b8628b28f04f13d3cd5
Alex Huszagh
2021-05-05T22:34:05
Improved support for the Lemire algorithm.
diff --git a/Cargo.toml b/Cargo.toml index 361ca3b..1f14bc3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,7 +45,7 @@ itoa_impl = { version = "0.4", features = ["i128"], package = "itoa" } lazy_static = "1" [features] -default = ["no_alloc", "ryu", "std"] +default = ["lemire", "no_alloc", "ryu", "std"] # FEATUR...
10
52
35
4b136c19582c1861c18441f7f1147a9b8f8bc38d
Alex Huszagh
2021-05-04T05:23:22
Added explicit tests for algorithm/errors.
diff --git a/lexical-core/src/atof/algorithm/correct.rs b/lexical-core/src/atof/algorithm/correct.rs index 18daef0..75e5f0b 100644 --- a/lexical-core/src/atof/algorithm/correct.rs +++ b/lexical-core/src/atof/algorithm/correct.rs @@ -179,7 +179,7 @@ where /// Multiply by pre-calculated powers of the base, modify the ex...
2
93
62
1cbec6bf196c6e1ea2de6062d4f0fd4720b11946
Alex Huszagh
2021-05-04T04:15:58
Added small powers for f128.
diff --git a/lexical-core/src/atof/algorithm/alias.rs b/lexical-core/src/atof/algorithm/alias.rs index c5d55b0..43f689a 100644 --- a/lexical-core/src/atof/algorithm/alias.rs +++ b/lexical-core/src/atof/algorithm/alias.rs @@ -600,8 +600,7 @@ impl MantissaType for u128 { #[inline(always)] fn small_powers(radi...
8
1,499
2
d343f6f3ccc3b46dae0c4eeda099baa300969326
Alex Huszagh
2021-05-04T03:39:06
Added ExactExponent for f16, bf16, and f128.
diff --git a/lexical-core/src/table/decimal.rs b/lexical-core/src/table/decimal.rs index 77b8f97..b29ca46 100644 --- a/lexical-core/src/table/decimal.rs +++ b/lexical-core/src/table/decimal.rs @@ -165,6 +165,276 @@ pub trait ExactExponent { fn mantissa_limit<T: Integer>(radix: T) -> i32; } +#[cfg(feature = "f16...
1
405
0
7ac5a85e9ef067db695900bc83a327cbb0918e63
Alex Huszagh
2021-05-04T03:08:44
Removed hard-coded logic. - Readded trivial implementation of algorithm_m. - Not compiled, just for future algorithm developments. - Removed hard-coded logic for u64 in correct and bigint parsing. - Should allow initial support for #46.
diff --git a/lexical-core/Cargo.toml b/lexical-core/Cargo.toml index ee89027..3f8cded 100644 --- a/lexical-core/Cargo.toml +++ b/lexical-core/Cargo.toml @@ -60,9 +60,20 @@ power_of_two = [] radix = ["power_of_two"] # Allow custom rounding schemes, at the cost of slower performance. rounding = [] +# Currently undocum...
10
401
64
0ce73c90db22b989a21d1b98422315335a3940ff
Alex Huszagh
2021-05-03T20:27:09
Reworked the internal traits. - Simplified atof signatures. - Removed some hard-coded logic for 64-bit mantissas. - Implemented algorithms in terms of generic mantissas.
diff --git a/lexical-core/src/atof/algorithm/alias.rs b/lexical-core/src/atof/algorithm/alias.rs index 14aef70..bbd7ab7 100644 --- a/lexical-core/src/atof/algorithm/alias.rs +++ b/lexical-core/src/atof/algorithm/alias.rs @@ -5,7 +5,8 @@ use crate::table::*; use crate::traits::*; use super::bignum::ToBigfloat; -use ...
9
179
139
650653a009b2f737dbd582712e3e5399ed378204
Alex Huszagh
2021-05-03T18:16:48
Simplified the type trait system.
diff --git a/lexical-core/src/atof/algorithm/alias.rs b/lexical-core/src/atof/algorithm/alias.rs index 457d5ec..14aef70 100644 --- a/lexical-core/src/atof/algorithm/alias.rs +++ b/lexical-core/src/atof/algorithm/alias.rs @@ -564,39 +564,32 @@ impl MaxIncorrectDigits for f128 { // ---------- /// Trait to simplify ty...
9
234
319
8887a019d3067ac54f32ad6f7bef7b13a1c39f79
Alex Huszagh
2021-05-03T13:44:03
Updated ExactExponent. - Added documentation for exponent_limit - Added documentation for mantissa_limit - Added sample code to auto-generate both. - Fixed some mantissa_limit values that were too low (this would not have affected accuracy, just made the fast_path a little too slow in some cases).
diff --git a/lexical-core/src/table/decimal.rs b/lexical-core/src/table/decimal.rs index 5e7f668..b48be66 100644 --- a/lexical-core/src/table/decimal.rs +++ b/lexical-core/src/table/decimal.rs @@ -67,6 +67,95 @@ pub(crate) const DIGIT_TO_BASE10_SQUARED: [u8; 200] = [ // EXACT EXPONENT // -------------- +// Calculat...
1
99
15
eaf41a15d21443990f1ff02df27d17852b79c77c
Alex Huszagh
2021-05-03T04:09:22
Added a simple example to show binary sizes.
diff --git a/Cargo.toml b/Cargo.toml index 060a0a0..07b349a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -133,6 +133,10 @@ name = "test-parse-unittests" path = "data/test-parse-unittests/main.rs" required-features = ["comprehensive_float_test"] +[[bin]] +name = "simple_example" +path = "bin/simple_example.rs" + # B...
2
9
0
eea7bfb9100f8e142757ae1ca782ac144f4f5e44
Alex Huszagh
2021-05-02T21:49:24
Updated documentation for pre-computed tables.
diff --git a/lexical-core/src/atof/algorithm/cached/float160.rs b/lexical-core/src/atof/algorithm/cached/float160.rs index 66ea785..f4c7efb 100644 --- a/lexical-core/src/atof/algorithm/cached/float160.rs +++ b/lexical-core/src/atof/algorithm/cached/float160.rs @@ -8,7 +8,15 @@ //! integer to calculate exact extended-r...
4
56
3
9cbe313f20110149a34ebcf238e7683331658f17
Alex Huszagh
2021-05-02T16:51:42
Fixed property_test feature gate.
diff --git a/lexical-core/src/atof/api.rs b/lexical-core/src/atof/api.rs index 64d3546..598ad2b 100644 --- a/lexical-core/src/atof/api.rs +++ b/lexical-core/src/atof/api.rs @@ -1236,7 +1236,7 @@ mod tests { assert!(f64::from_lexical_with_options(b"-012.0", &options).is_err()); } - #[cfg(all(feature =...
1
1
1
5733e36a30383bf09fcc71fab0187072833890c1
Alex Huszagh
2021-05-02T06:49:07
Bug fixes for various feature changes.
diff --git a/lexical-core/src/itoa/api.rs b/lexical-core/src/itoa/api.rs index 8638dbd..c60a6ee 100644 --- a/lexical-core/src/itoa/api.rs +++ b/lexical-core/src/itoa/api.rs @@ -3,6 +3,7 @@ //! Uses either the optimized decimal algorithm, the optimized generic //! algorithm, or the naive algorithm. +#[cfg(feature = ...
4
14
25
16cbd7cd9a7f517fa7d6ef690badbdc030088e88
Alex Huszagh
2021-05-02T06:41:25
Removed unnecessary trait imports.
diff --git a/lexical-core/src/traits/num.rs b/lexical-core/src/traits/num.rs index 4e71643..d6feae8 100644 --- a/lexical-core/src/traits/num.rs +++ b/lexical-core/src/traits/num.rs @@ -4,10 +4,6 @@ //! types, and trait bounds, and conversions for working with //! numbers in generic code. -// We have a lot of high-l...
6
3
15
34bf8564b4aba77c880e26adc547579ecd845b34
Alex Huszagh
2021-04-28T13:59:07
Added additional flags and conditions for i128.
diff --git a/lexical-capi/src/config.rs b/lexical-capi/src/config.rs index 535a4d7..264d7b9 100644 --- a/lexical-capi/src/config.rs +++ b/lexical-capi/src/config.rs @@ -11,6 +11,12 @@ use lexical_core::{self, Number}; #[cfg(feature = "format")] pub static LEXICAL_HAS_FORMAT: usize = 1; +/// Exported symbol to denot...
1
10
0
dcdb3e9e8309d72f27cb531688048974adbc1eb4
Alex Huszagh
2021-04-28T13:56:47
Added flags for wrappers to test bindings.
diff --git a/lexical-capi/src/config.rs b/lexical-capi/src/config.rs index b1536f0..535a4d7 100644 --- a/lexical-capi/src/config.rs +++ b/lexical-capi/src/config.rs @@ -2,153 +2,174 @@ use lexical_core::{self, Number}; +// FEATURES + + +/// Exported symbol to denote the presence of the format feature. +#[no_mangle...
1
50
29
40c59a3fa7a41c8d6fe44663b4e71468c9e73e9a
Alex Huszagh
2021-04-28T13:50:04
Added more exclude categories for smaller crates.
diff --git a/Cargo.toml b/Cargo.toml index 9bc96ad..62c1980 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,10 +12,15 @@ readme = "README.md" repository = "https://github.com/Alexhuszagh/rust-lexical" version = "6.0.0" exclude = [ + "assets/*", + "ci/*", "data/*", "benches/*", - "lexical-codegen/*...
3
43
16
5ec25f2ba00a3621ba5bbf2d046dd864857f1dd6
Alex Huszagh
2021-04-28T13:33:14
Added the no_alloc feature. - Uses arrarayvec if the no_alloc feature is enabled. - Otherwise, uses vec.
diff --git a/lexical-core/Cargo.toml b/lexical-core/Cargo.toml index d2a51ab..d578893 100644 --- a/lexical-core/Cargo.toml +++ b/lexical-core/Cargo.toml @@ -43,12 +43,12 @@ rustc_version = "0.3" approx = "0.4.0" [features] -default = ["atof", "atoi", "ftoa", "itoa", "ryu", "std"] +default = ["atof", "atoi", "ftoa",...
7
235
147
01cfd741f61261619037b6ccf1634057557797d4
Alex Huszagh
2021-04-27T08:06:36
Patched const fn to support older Rustc versions.
diff --git a/lexical-core/Cargo.toml b/lexical-core/Cargo.toml index 55c4b60..d2a51ab 100644 --- a/lexical-core/Cargo.toml +++ b/lexical-core/Cargo.toml @@ -36,6 +36,9 @@ quickcheck = { version = "1.0.3", optional = true } # Enable proptest for newer Rustc versions. proptest = { version = "0.10.1", optional = true } ...
9
104
32
81ccf801887c01489b842d7061712d253ab1e6be
Alex Huszagh
2021-04-27T04:54:42
Added aliases for the new submodules.
diff --git a/Cargo.toml b/Cargo.toml index dd13295..9bc96ad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,6 +53,14 @@ ftoa = ["lexical-core/ftoa"] # Only build the itoa submodule. itoa = ["lexical-core/itoa"] +# ALIASES +# ------- +# Aliases for the above features, using less C-like names. +parse_floats = ["atof"...
4
30
0
4aa5f2b24fa58237d68d66413473c348ab131c53
Alex Huszagh
2021-04-27T04:30:01
Fixed the external tests and lexical-derive.
diff --git a/lexical-derive/Cargo.toml b/lexical-derive/Cargo.toml index 7373717..f667b26 100644 --- a/lexical-derive/Cargo.toml +++ b/lexical-derive/Cargo.toml @@ -7,24 +7,30 @@ publish = false [dependencies] quote = "1.0" syn = "1.0" -lexical-core = { path = "../lexical-core", version = "0.7.0", default-features =...
3
17
14
c13b1769885e6a942664467119f7630714515e26
Alex Huszagh
2021-04-27T04:24:06
Removed resolved TODOs.
diff --git a/Cargo.toml b/Cargo.toml index fffcfcb..dd13295 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,13 +44,13 @@ default = ["atof", "atoi", "ftoa", "itoa", "ryu", "std"] # SUBMODULES # ---------- -# Only build the atof submoudle. +# Only build the atof submodule. atof = ["lexical-core/atof"] -# Only build ...
8
24
21
c5c28c23937f9c8b3cfa0534ac18f5d18b49234a
Alex Huszagh
2021-04-27T01:36:32
Fixed the atoi unittests.
diff --git a/lexical-core/src/atoi/api.rs b/lexical-core/src/atoi/api.rs index 799766e..ed1c611 100644 --- a/lexical-core/src/atoi/api.rs +++ b/lexical-core/src/atoi/api.rs @@ -202,11 +202,12 @@ mod tests { assert_eq!(Err((ErrorCode::InvalidDigit, 1).into()), u8::from_lexical(b"1a")); } - #[cfg(featu...
3
100
81
692dfa39becd43c32ccf25c43cab48fc7bf9a133
Alex Huszagh
2021-04-26T22:34:21
Minor import warning fix for no features.
diff --git a/src/lib.rs b/src/lib.rs index 8867991..38216b4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -54,6 +54,7 @@ // EXTERNAL #[macro_use] +#[cfg(any(feature = "atof", feature = "atoi", feature = "ftoa", feature = "itoa"))] extern crate cfg_if; extern crate lexical_core; @@ -65,6 +66,7 @@ extern crate lexi...
1
2
0
1d2871280ec8b96d849399ff7d6d4f6748528d84
Alex Huszagh
2021-04-26T19:28:11
Moved the data interface out further for higher performance with format.
diff --git a/lexical-core/src/atof/algorithm/correct.rs b/lexical-core/src/atof/algorithm/correct.rs index 39108b3..a70dbe9 100644 --- a/lexical-core/src/atof/algorithm/correct.rs +++ b/lexical-core/src/atof/algorithm/correct.rs @@ -434,27 +434,28 @@ fn pow2_exponent(radix: u32) -> i32 { /// /// The float string must...
6
102
80
7cb4f93010743b26ac9b7d3ef5ea776833506f55
Alex Huszagh
2021-04-26T18:28:16
Bug fixes for NumberFormat::exponent.
diff --git a/lexical-benchmark/lexical/Cargo.toml b/lexical-benchmark/lexical/Cargo.toml index 541e4b3..abd7085 100644 --- a/lexical-benchmark/lexical/Cargo.toml +++ b/lexical-benchmark/lexical/Cargo.toml @@ -15,7 +15,17 @@ lazy_static = "1" serde_json = "1.0" [features] -default = ["ryu", "std"] +default = ["atof"...
5
30
9
95fedb616efcb4cf501447a13f1e6cc15425ef21
Alex Huszagh
2021-04-26T17:51:04
Added max digit traits for correct and incorrect parsers. - MaxIncorrectDigits allows a fast short-circuit for long floats. - MaxCorrectDigits provides a faster abstraction than the one in bhcomp.
diff --git a/lexical-core/src/atof/algorithm/alias.rs b/lexical-core/src/atof/algorithm/alias.rs index a987251..4386430 100644 --- a/lexical-core/src/atof/algorithm/alias.rs +++ b/lexical-core/src/atof/algorithm/alias.rs @@ -5,18 +5,585 @@ use crate::util::*; use super::bignum::ToBigfloat; use super::errors::FloatErr...
3
586
144
70e5aa95f4fd98a7656c7e36006cf477fe31c657
Alex Huszagh
2021-04-26T12:02:17
Initial refactorization to improve compile times.
diff --git a/lexical-core/src/lib.rs b/lexical-core/src/lib.rs index a6c49f9..7bff1ee 100644 --- a/lexical-core/src/lib.rs +++ b/lexical-core/src/lib.rs @@ -134,10 +134,19 @@ pub(crate) mod lib { #[macro_use] mod util; +#[cfg(any(feature = "atof", feature = "ftoa"))] +mod float; + +#[cfg(feature = "atof")] mod ato...
1
10
1
c6d69b0b1030f96b184eb6a8487703e09ad652d8
Alex Huszagh
2021-04-26T11:50:55
Added to_lexical_with_options for ftoa.
diff --git a/Cargo.toml b/Cargo.toml index a07e471..fffcfcb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,11 +36,25 @@ approx = "0.4.0" criterion = "0.3" dtoa = "0.4" ryu_impl = { version = "1.0", package = "ryu" } -itoa = { version = "0.4", features = ["i128"] } +itoa_impl = { version = "0.4", features = ["i128"]...
14
229
511
331fcd75e13d89cdfb9e3360c98105dfb55bde78
Alex Huszagh
2021-04-26T10:40:42
Added to_lexical_with_options for itoa.
diff --git a/benches/atof.rs b/benches/atof.rs index b4bc989..97a8fa3 100644 --- a/benches/atof.rs +++ b/benches/atof.rs @@ -20050,14 +20050,14 @@ const F64_DATA: [&'static str; 10000] = [ fn lexical(criterion: &mut Criterion) { let mut group = criterion.benchmark_group("lexical"); - group.measurement_time(D...
9
154
60
9988ff119967c3559299e2e81299404c3e8e3798
Alex Huszagh
2021-04-26T10:06:41
Reenabled and fixes benches.
diff --git a/Cargo.toml b/Cargo.toml index 041f6f4..a07e471 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -121,35 +121,35 @@ required-features = ["comprehensive_float_test"] # Benchmarks -#[[bench]] -#name = "atof" -#path = "benches/atof.rs" -#harness = false -# -#[[bench]] -#name = "atof_malicious" -#path = "benche...
5
28
139
022bfdb453dd877e95054ad5a6d182d056b5d1d6
Alex Huszagh
2021-04-26T09:41:45
Add support for custom exponent and decimal point characters, fixing #58.
diff --git a/lexical-core/src/atof/algorithm/format/permissive.rs b/lexical-core/src/atof/algorithm/format/permissive.rs index cc40353..cb5e0cc 100644 --- a/lexical-core/src/atof/algorithm/format/permissive.rs +++ b/lexical-core/src/atof/algorithm/format/permissive.rs @@ -20,7 +20,7 @@ data_interface!( integer_ite...
7
29
16
fa15624a33efe5aa22a1eaa9ecf05cdee5f03c7a
Alex Huszagh
2021-04-26T00:06:18
Removed the correct feature, now enabled by default.
diff --git a/Cargo.toml b/Cargo.toml index 85d48db..041f6f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,9 +40,7 @@ itoa = { version = "0.4", features = ["i128"] } lazy_static = "1" [features] -default = ["correct", "ryu", "std"] -# Use the correct atof parser. -correct = ["lexical-core/correct"] +default = ["ry...
6
51
62