Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reimplement pow function for integer exponent. #638

Merged
merged 6 commits into from
Jan 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Exclude a failing test that was caused by the deprecated legacy-ops f…
…eature
paupino authored Jan 13, 2024

Unverified

The committer email address is not verified.
commit b22745308e72718ba8222215209ec98bec72b43c
27 changes: 6 additions & 21 deletions tests/decimal_tests.rs
Original file line number Diff line number Diff line change
@@ -3968,43 +3968,28 @@ mod maths {
}

#[test]
#[cfg(not(feature = "legacy-ops"))]
fn test_norm_cdf() {
let test_cases = &[
(
Decimal::from_str("-0.4").unwrap(),
either!(
Decimal::from_str("0.3445781286821245037094401704").unwrap(),
Decimal::from_str("0.3445781286821245037094401728").unwrap()
),
Decimal::from_str("0.3445781286821245037094401704").unwrap(),
),
(
Decimal::from_str("-0.1").unwrap(),
either!(
Decimal::from_str("0.4601722899186706579921922696").unwrap(),
Decimal::from_str("0.4601722899186706579921922711").unwrap()
),
Decimal::from_str("0.4601722899186706579921922696").unwrap(),
),
(
Decimal::from_str("0.1").unwrap(),
Decimal::from_str(either!(
"0.5398277100813293420078077304",
"0.5398277100813293420078077290"
))
.unwrap(),
Decimal::from_str("0.5398277100813293420078077304").unwrap(),
),
(
Decimal::from_str("0.4").unwrap(),
either!(
Decimal::from_str("0.6554218713178754962905598296").unwrap(),
Decimal::from_str("0.6554218713178754962905598272").unwrap()
),
Decimal::from_str("0.6554218713178754962905598296").unwrap(),
),
(
Decimal::from_str("2.0").unwrap(),
either!(
Decimal::from_str("0.9772497381095865280953380673").unwrap(),
Decimal::from_str("0.9772497381095865280953380672").unwrap()
),
Decimal::from_str("0.9772497381095865280953380673").unwrap(),
),
];
for case in test_cases {