Skip to content

Commit 460a3a4

Browse files
committed
forbid base 1
1 parent 6746cc8 commit 460a3a4

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/algorithm/dyadic/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1802,6 +1802,9 @@ impl<T: RealArrayValue> Array<T> {
18021802
if base == 0.0 {
18031803
return Err(env.error("Base cannot be 0"));
18041804
}
1805+
if base == 1.0 {
1806+
return Err(env.error("Base cannot be 1"));
1807+
}
18051808
if base.is_infinite() {
18061809
return Err(env.error("Base cannot be infinite"));
18071810
}

tests_special/error.ua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,4 +180,6 @@ F ← |0.1000 ⍢(F F F|1)
180180

181181
⬚0⌝▽ 0_0 1_2
182182

183-
°⊸(⌝⤸0) ⇡3 °△3_3
183+
°⊸(⌝⤸0) ⇡3 °△3_3
184+
185+
⊥1 5

0 commit comments

Comments
 (0)