about summary refs log tree commit diff
path: root/library/std/tests/floats
AgeCommit message (Collapse)AuthorLines
2025-09-09add approx_delta to all gamma testsLorrensP-2158466-5/+5
2025-09-06Change stdlib float tests to account for miri nondet floats.LorrensP-2158466-7/+7
2025-08-31fixLorrensP-2158466-2/+2
2025-08-08Revert "Rollup merge of #143906 - ↵Jakub Beránek-7/+7
LorrensP-2158466:miri-float-nondet-foreign-items, r=RalfJung" This reverts commit 71f04692c32e181ab566c01942f1418dec8662d4, reversing changes made to 995ca3e532b48b689567533e6b736675e38b741e.
2025-08-06Change stdlib float tests to account for miri nondet floats.LorrensP-2158466-7/+7
2025-06-05change tests to use fixed constants to let them pass with miriLorrensP-2158466-52/+12
2025-06-03Enable Float non-determinism in miri. Update and add tests and changeLorrensP-2158466-18/+63
change tests in std, core and coretests.
2025-05-14Move applicable float tests from `coretests` back to `std`Trevor Gross-0/+1166
The previous commit moved all test files from `std` to `core` so git understands the move. Not all functionality is actually testable in `core`, however, so perform move the relevant portions back. Changes from inherent to module methods is also done since this is the form of math operations available in `core` (as `core_float_math`).
2025-05-13Move float tests from std to coreTrevor Gross-3994/+0
Many float-related tests in `std` only depend on `core`, so move the tests there. This also allows us to verify functions from `core_float_math`. Since the majority of test files need to be moved to `coretests`, move the files here without any cleanup; this is done in a followup commit. This makes git history slightly cleaner, but coretests will not build immediately after this commit.
2025-05-12update cfg(bootstrap)Pietro Albini-64/+2
2025-04-27Use `feature(target_has_reliable_f16_f128)` in library testsTrevor Gross-62/+192
New compiler configuration has been introduced that is designed to replace the build script configuration `reliable_f16`, `reliable_f128`, `reliable_f16_math`, and `reliable_f128_math`. Do this replacement here, which allows us to clean up `std`'s build script. All tests are gated by `#[cfg(bootstrap)]` rather than doing a more complicated `cfg(bootstrap)` / `cfg(not(bootstrap))` split since the next beta split is within two weeks.
2025-04-22test_nan: ensure the NAN contant is quietRalf Jung-0/+8
2025-04-04Expose algebraic floating point intrinsicsCalder Coalson-2/+82
2025-03-17Auto merge of #138363 - beetrees:f16-f128-integer-convert, r=Amanieubors-0/+43
Add `From<{integer}>` for `f16`/`f128` impls This PR adds `impl From<{bool,i8,u8}> for f16` and `impl From<{bool,i8,u8,i16,u16,i32,u32}> for f128`. The `From<{i64,u64}> for f128` impls are left commented out as adding them would allow using `f128` on stable before it is stabilised like in the following example: ```rust fn f<T: From<u64>>(x: T) -> T { x } fn main() { let x = f(1.0); // the type of the literal is inferred to be `f128` } ``` None of the impls added in this PR have this issue as they are all, at minimum, also implemented by `f64`. This PR will need a crater run for the `From<{i32,u32}>` impls, as `f64` is no longer the only float type to implement them (similar to the cause of #125198). cc `@bjoernager` r? `@tgross35` Tracking issue: #116909
2025-03-11Add `From<{integer}>` for `f16`/`f128` implsbeetrees-0/+43
2025-03-11Enable `f16` tests for `powf`Trevor Gross-43/+41
The LLVM issue [1] was fixed with [2], which is included in the LLVM20 upgrade. Tests no longer fail, so enable them here. [1]: https://github.com/llvm/llvm-project/pull/98681 [2]: https://github.com/llvm/llvm-project/pull/98681
2025-02-02Remove stabilized feature gatebjorn3-1/+1
2025-01-26Move std float unit tests to integration testsbjorn3-0/+3797