about summary refs log tree commit diff
path: root/src/libcore/num/dec2flt
AgeCommit message (Collapse)AuthorLines
2020-07-27mv std libs to library/mark-2612/+0
2020-04-16Dogfood or_patterns in the standard libraryJosh Stone-2/+2
2020-03-26Rename asm! to llvm_asm!Amanieu d'Antras-2/+2
asm! is left as a wrapper around llvm_asm! to maintain compatibility.
2020-01-23Fix some float operations to work together with the assoc constsLinus Färnstrand-5/+5
2019-12-21Require issue = "none" over issue = "0" in unstable attributesRoss MacArthur-2/+2
2019-11-29Make dec2flt_table compatible with rustfmtDavid Tolnay-1225/+1231
2019-11-26Format libcore with rustfmtDavid Tolnay-65/+71
This commit applies rustfmt with default settings to files in src/libcore *that are not involved in any currently open PR* to minimize merge conflicts. The list of files involved in open PRs was determined by querying GitHub's GraphQL API with this script: https://gist.github.com/dtolnay/aa9c34993dc051a4f344d1b10e4487e8 With the list of files from the script in `outstanding_files`, the relevant commands were: $ find src/libcore -name '*.rs' | xargs rustfmt --edition=2018 $ rg libcore outstanding_files | xargs git checkout -- Repeating this process several months apart should get us coverage of most of the rest of libcore.
2019-11-06Have tidy ensure that we document all `unsafe` blocks in libcoreOliver Scherer-0/+4
2019-10-22Apply clippy::useless_let_if_seq suggestionMateusz Mikuła-5/+4
2019-04-19libcore: deny more...Mazdak Farrokhzad-6/+6
2019-04-18libcore => 2018Taiki Endo-20/+20
2019-03-11Improvements to comments in libstd, libcore, liballoc.Alexander Regueiro-5/+5
2019-02-10libs: doc commentsAlexander Regueiro-9/+9
2019-02-10tests: doc commentsAlexander Regueiro-8/+8
2019-01-25Rollup merge of #56217 - frewsxcv:frewsxcv-float-parse, r=QuietMisdreavusMazdak Farrokhzad-1/+25
Add grammar in docs for {f32,f64}::from_str, mention known bug. - Original bug about documenting grammar - https://github.com/rust-lang/rust/issues/32243 - Known bug with parsing - https://github.com/rust-lang/rust/issues/31407
2019-01-22reposition markdown hyperlink referenceCorey Farwell-2/+2
2018-12-25Remove licensesMark Rousskov-60/+0
2018-12-22Update src/libcore/num/dec2flt/mod.rsMazdak Farrokhzad-1/+3
Co-Authored-By: frewsxcv <coreyf@rwell.org>
2018-12-22Update regex to EBNFCorey Farwell-10/+8
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-4/+4
2018-12-03...and fix a linkCorey Farwell-1/+1
2018-12-03tweak 'known issues' wordingCorey Farwell-2/+2
2018-11-25Add grammar for {f32,f64}::from_str, mention known bug.Corey Farwell-1/+25
- Original bug about documenting grammar - https://github.com/rust-lang/rust/issues/32243 - Known bug with parsing - https://github.com/rust-lang/rust/issues/31407
2018-08-04Remove redundant field names in structsljedrz-4/+4
2018-05-22Remove the unstable Float traitSimon Sapin-10/+23
Following up to #49896 and #50629. Fixes #32110. E0689 is weird.
2018-02-19Make ".e0" not parse as 0.0varkor-1/+2
This forces floats to have either a digit before the separating point, or after. Thus ".e0" is invalid like ".", when using `parse()`.
2017-12-23Move Bits constraints to RawFloat::RawBitsClar Charr-4/+19
2017-12-22Expose float from_bits and to_bits in libcore.Clar Charr-33/+6
2017-09-04Removed the incorrect documentation for from_strMax Comstock-1/+0
2017-08-15Fix typos & us spellingsFourchaux-3/+3
2017-08-11Fix some typosBastien Orivel-1/+1
2017-04-20Remove float_extrasJosh Stone-7/+34
[unstable, deprecated since 1.11.0]
2017-04-14Use associated constants in core::num::dec2fltRobin Kruppe-152/+98
2017-04-03Replace ^ with <sup> html baliseGuillaume Gomez-6/+7
2017-03-25Fix typo in dec2flt/algorithm.rsIrfan Hudda-2/+2
2016-09-18Add missing Eq implementationsGuillaume Gomez-2/+2
2016-08-24Use `#[prelude_import]` in `libcore`.Jeffrey Seyfried-6/+0
2016-07-03std: Stabilize APIs for the 1.11.0 releaseAlex Crichton-11/+40
Although the set of APIs being stabilized this release is relatively small, the trains keep going! Listed below are the APIs in the standard library which have either transitioned from unstable to stable or those from unstable to deprecated. Stable * `BTreeMap::{append, split_off}` * `BTreeSet::{append, split_off}` * `Cell::get_mut` * `RefCell::get_mut` * `BinaryHeap::append` * `{f32, f64}::{to_degrees, to_radians}` - libcore stabilizations mirroring past libstd stabilizations * `Iterator::sum` * `Iterator::product` Deprecated * `{f32, f64}::next_after` * `{f32, f64}::integer_decode` * `{f32, f64}::ldexp` * `{f32, f64}::frexp` * `num::One` * `num::Zero` Added APIs (all unstable) * `iter::Sum` * `iter::Product` * `iter::Step` - a few methods were added to accomodate deprecation of One/Zero Removed APIs * `From<Range<T>> for RangeInclusive<T>` - everything about `RangeInclusive` is unstable Closes #27739 Closes #27752 Closes #32526 Closes #33444 Closes #34152 cc #34529 (new tracking issue)
2016-05-16Fix `asm!` blocksAndrea Canciani-2/+2
The `volatile` modifier was incorrectly written outside of the `asm!` blocks.
2016-05-16Cleanup documentationAndrea Canciani-31/+10
Remove irrelevant information (and instead provide pointer to reference documentation), replace ASCII-art table with the corresponding MarkDown one, and minor fixes.
2016-05-13Document the x87 control wordAndrea Canciani-5/+62
Explain the meaning of the fields of the control word and provide more details about how the relevant one (Precision Control) is updated in the fast path.
2016-05-13Fix fast path of float parsing on x87Andrea Canciani-7/+40
The fast path of the float parser relies on the rounding to happen exactly and directly to the correct number of bits. On x87, instead, double rounding would occour as the FPU stack defaults to 80 bits of precision. This can be fixed by setting the precision of the FPU stack before performing the int to float conversion. This can be achieved by changing the value of the x87 control word. This is a somewhat common operation that is in fact performed whenever a float needs to be truncated to an integer, but it is undesirable to add its overhead for code that does not rely on x87 for computations (i.e. on non-x86 architectures, or x86 architectures which perform FPU computations on using SSE). Fixes `num::dec2flt::fast_path_correct` (on x87).
2016-04-01Fix a couple of dead links on core::num::ParseFloatError docsOliver Middleton-2/+2
2016-03-22try! -> ?Jorge Aparicio-1/+1
Automated conversion using the untry tool [1] and the following command: ``` $ find -name '*.rs' -type f | xargs untry ``` at the root of the Rust repo. [1]: https://github.com/japaric/untry
2016-02-09Some docs for std::numSteve Klabnik-0/+7
This commit does two things: * Re-works the module-level documentation. * Cleaning up wording and adding links to where error types are used. Part of #29364
2016-02-04drive-by doc fixesRobin Kruppe-1/+1
2016-02-04Prevent the immediate panic uncovered by #31109 and add a test.Robin Kruppe-8/+28
The code there still triggers an ICE, but for different reasons (const eval unwraps the parse result).
2016-02-04Use the right target ratio in Algorithm M quickstart.Robin Kruppe-1/+1
Using f64's bit size probably wasn't actually *wrong*, but it would overshoot for no reason. This might have slowed down f32 parsing significantly.
2016-01-13Auto merge of #30639 - rkruppe:dec2flt-fastpath-tables, r=alexcrichtonbors-9/+59
Add tables of small powers of ten used in the fast path. The tables are redundant: We could also use the big, more accurate table and round the value to the correct type (in fact we did just that before this commit). However, the rounding is extra work and slows down the fast path. Because only very small exponents enter the fast path, the table and thus the space overhead is negligible. Speed-wise, this is a clear win on a [benchmark] comparing the fast path to a naive, hand-optimized, inaccurate algorithm. Specifically, this change narrows the gap from a roughly 5x difference to a roughly 3.4x difference. [benchmark]: https://gist.github.com/Veedrac/dbb0c07994bc7882098e
2016-01-12Speed up dec2flt fast path with additional tables.Robin Kruppe-9/+59
Add tables of small powers of ten used in the fast path. The tables are redundant: We could also use the big, more accurate table and round the value to the correct type (in fact we did just that before this commit). However, the rounding is extra work and slows down the fast path. Because only very small exponents enter the fast path, the table and thus the space overhead is negligible. Speed-wise, this is a clear win on a [benchmark] comparing the fast path to a naive, hand-optimized, inaccurate algorithm. Specifically, this change narrows the gap from a roughly 5x difference to a roughly 3.4x difference. [benchmark]: https://gist.github.com/Veedrac/dbb0c07994bc7882098e