Num.pow for Dec

This commit is contained in:
Folkert 2024-01-29 20:41:14 +01:00
parent 2e648cfdd5
commit e16b25c93e
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
7 changed files with 125 additions and 2 deletions

View file

@ -1819,10 +1819,16 @@ fn float_compare() {
#[test]
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
fn pow() {
fn pow_f64() {
assert_evals_to!("Num.pow 2.0f64 2.0f64", 4.0, f64);
}
#[test]
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
fn pow_dec() {
assert_evals_to!("Num.pow 2.0dec 2.0dec", RocDec::from(4), RocDec);
}
#[test]
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
fn round_f64() {