Skip to content

Commit bfd661d

Browse files
committed
fix an infinite loop in base
1 parent 7949448 commit bfd661d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/algorithm/dyadic/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1796,6 +1796,9 @@ impl<T: RealArrayValue> Array<T> {
17961796
if base == 1.0 {
17971797
return Err(env.error("Base cannot be 1"));
17981798
}
1799+
if base == -1.0 {
1800+
return Err(env.error("Base cannot be ¯1"));
1801+
}
17991802
if base.is_infinite() {
18001803
return Err(env.error("Base cannot be infinite"));
18011804
}

0 commit comments

Comments
 (0)