1058 Commits

Author SHA1 Message Date
openharmony_ci d903354a29 !4 Add oh user guide
Merge pull request !4 from fangting/master
OpenHarmony-v4.0.4-Release OpenHarmony-v4.0.3-Release OpenHarmony-v4.0.2-Release OpenHarmony-v4.0-Beta1 OpenHarmony-v4.0-Beta2 OpenHarmony-v4.0-Release OpenHarmony-v4.0.1-Release OpenHarmony-v4.1-Beta1 master-v weekly_20240115-v
2023-05-04 06:17:07 +00:00
fangting 810a81add8 add oh user guide
Signed-off-by: fangting <fangting12@huawei.com>
2023-05-04 11:59:25 +08:00
openharmony_ci 84642297df !3 Add README_zh.md
Merge pull request !3 from fangting/master
2023-04-25 03:45:18 +00:00
haotuo c388d84143 Add oh usage guide
Issue:#I6YAO1

Signed-off-by: haotuo <haotuo@huawei.com>
2023-04-24 17:38:14 +08:00
fangting 7fb3b7b72c Add READ_zh.md
Signed-off-by: fangting <fangting12@huawei.com>
2023-04-24 11:14:54 +08:00
openharmony_ci aa2d42b140 !2 Add OAT.xml and README.OpenSource
Merge pull request !2 from fangting/master
2023-04-14 08:10:56 +00:00
fangting ba7ac46848 Add OAT.xml and README.OpenSource
Signed-off-by: fangting <fangting12@huawei.com>
2023-04-14 14:15:12 +08:00
openharmony_ci b795b64fa0 !1 [num-traits]Add OH support and BUILD.gn for rust num-traits
Merge pull request !1 from haotuo/master
2023-04-13 11:33:47 +00:00
haotuo 35b2cf0d7d Add BUILD.gn for OH build
Issue:https://gitee.com/openharmony/build/issues/I6UFTP

Signed-off-by: haotuo <haotuo@huawei.com>
2023-04-11 17:38:51 +08:00
bors[bot] 57999935ed Merge #236
236: Release 0.2.15 r=cuviper a=cuviper



Co-authored-by: Josh Stone <cuviper@gmail.com>
github.com/rust-num/num-traits.git/num-traits-0.2.15 github.com/rust-num/num-traits/num-traits-0.2.15
2022-05-03 00:41:45 +00:00
Josh Stone 159f9adcab Release 0.2.15 2022-05-02 17:37:30 -07:00
bors[bot] 9b364693e6 Merge #207
207: Add copysign r=cuviper a=XAMPPRocky

Resolves #152
Closes #155

Co-authored-by: Erin Power <erin.power@embark-studios.com>
Co-authored-by: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com>
Co-authored-by: Josh Stone <cuviper@gmail.com>
2022-05-02 23:58:51 +00:00
Josh Stone e1361fe3e0 Fix copysign tests for 1.8.0 2022-04-29 18:37:16 -07:00
Josh Stone a682d93880 Don't use an explicit copysign feature 2022-04-29 18:37:16 -07:00
Josh Stone 2fe191843c Make sure test_copysignf uses Float 2022-04-29 18:37:16 -07:00
XAMPPRocky 1b04b78740 Update float.rs 2022-04-29 18:10:11 -07:00
XAMPPRocky fdd43fad3d Update float.rs 2022-04-29 18:10:11 -07:00
XAMPPRocky fac306842a Update float.rs 2022-04-29 18:10:11 -07:00
Erin Power 37575361a6 Add copysign 2022-04-29 18:10:11 -07:00
bors[bot] dae9bc13d2 Merge #195
195: Add support for euclidean division and modulation r=cuviper a=SparrowLii

Fixes #159 
Add support for euclidean division and modulation. 

Co-authored-by: SparrowLii <liyuancylx@gmail.com>
Co-authored-by: SparrowLii <liyuan179@huawei.com>
Co-authored-by: Josh Stone <cuviper@gmail.com>
2022-04-30 01:03:28 +00:00
Josh Stone 05fd16d2a0 Forward euclid methods when possible 2022-04-29 17:53:50 -07:00
Josh Stone 039fb91251 tweak euclid tests 2022-04-29 17:22:07 -07:00
SparrowLii d68870321f take references as parameters 2022-04-29 17:22:07 -07:00
SparrowLii 7ece7edabf fixes codes structure etc. 2022-04-29 17:22:07 -07:00
SparrowLii a0a6154a75 Fixes epsilon 2022-04-29 17:22:07 -07:00
SparrowLii e4b037c2c0 fixes MIN 2022-04-29 17:22:07 -07:00
SparrowLii 59a72a8fb9 Fixes methods 2022-04-29 17:22:07 -07:00
SparrowLii f09717c82b fixes method impl 2022-04-29 17:22:07 -07:00
SparrowLii d4191d236c Fixes use core::float 2022-04-29 17:22:07 -07:00
SparrowLii dde1bdda60 fixes example 2022-04-29 17:22:07 -07:00
SparrowLii 4533ad7bb0 fixes ::Float 2022-04-29 17:22:07 -07:00
SparrowLii 6f778fafdf fixes float::Float and fmt 2022-04-29 17:22:07 -07:00
SparrowLii b3ba355daa Add support for euclidean division and modulation 2022-04-29 17:22:07 -07:00
bors[bot] 6496b21596 Merge #203
203: A few small patches r=cuviper a=sshilovsky



Co-authored-by: Sergei Shilovsky <sshilovsky@gmail.com>
2022-04-30 00:04:32 +00:00
Sergei Shilovsky da62ee51e6 Skip check_numassignref_ops test for old rustc 2022-04-29 16:58:43 -07:00
Sergei Shilovsky 527da0fa21 Highlight difference in traits' abstraction level
Short descriptions for NumOps sort of blended in with NumRef and RefNum.
This suggests to clarify the difference a little bit more.
2022-04-29 16:57:11 -07:00
Sergei Shilovsky ad307574de add test: check_numassignref_ops 2022-04-29 16:57:11 -07:00
Sergei Shilovsky 7220b0bcd3 impl Num Wrapping<T> can rely on NumOps instead 2022-04-29 16:57:11 -07:00
bors[bot] 291e30a06a Merge #231
231: Fix cfg typo r=cuviper a=alion02



Co-authored-by: alion02 <alojczek@gmail.com>
2022-04-29 23:46:08 +00:00
alion02 78aae4c700 Fix cfg typo 2022-01-21 02:23:32 +01:00
bors[bot] c749a7263c Merge #218
218: Implement is_sign_* and signum methods in terms of bitcasts. r=cuviper a=ElectronicRU

# Rationale

[rust-gpu](/EmbarkStudios/rust-gpu) project uses num-traits directly and via glam. However, integer_decode() function is a bit poisonous for it - it immediately requires both Int16 and Int64 capabilities.

This PR reimplements corresponding functions in terms of libm's copysign. (For some reason, rust's libm is missing signbit - it can be done with a bitcast though, maybe that's actually a better implementation avenue).

Co-authored-by: Alex S <alex0player@gmail.com>
2021-07-08 23:20:05 +00:00
Alex S c24991f3f3 Reimplement is_sign_negative as a bitcast, libm not necessary. 2021-07-01 00:39:26 +03:00
Alex S 622263ab9f Implement is_sign_* and signum methods in terms of libm. 2021-06-24 19:40:54 +03:00
bors[bot] 72f88d7700 Merge #202
202: PrimInt: add reverse_bits() method r=cuviper a=Xiretza



Co-authored-by: Xiretza <xiretza@xiretza.xyz>
Co-authored-by: Josh Stone <cuviper@gmail.com>
2021-06-16 00:41:55 +00:00
Josh Stone 5bf2599fef Merge branch 'master' into reverse-bits 2021-06-15 17:30:17 -07:00
bors[bot] 89cf792ed1 Merge #214
214: Ignore case for float parsing of text special values r=cuviper a=tspiteri

This copies some of the standard library fixes of <https://github.com/rust-lang/rust/pull/78618>.

Co-authored-by: Trevor Spiteri <tspiteri@ieee.org>
2021-06-16 00:18:05 +00:00
bors[bot] 13be1fbb31 Merge #205
205: Add leading_ones and trailing_ones to PrimInt r=cuviper a=clarfonthey

Since this was only stabilised in 1.46.0, it falls back to a naïve version on older versions.

It seems unlikely that the version in libstd will ever be different from calling the zeros versions on !self, but for future-proofing, this defers to the libstd versions anyway.

Co-authored-by: ltdk <usr@ltdk.xyz>
2021-06-15 23:44:43 +00:00
Trevor Spiteri 4154fb5af9 Ignore case for float parsing of text special values
This copies some of the standard library fixes of
<https://github.com/rust-lang/rust/pull/78618>.
2021-04-15 20:15:46 +02:00
Xiretza 9b9d0ef5d7 PrimInt: add unit tests for reverse_bits 2021-04-13 22:30:09 +02:00
ltdk d989634fda Add leading_ones and trailing_ones to PrimInt 2021-04-09 21:43:48 -04:00