mirror of
https://github.com/PaddiM8/kalker.git
synced 2024-12-04 13:43:49 +01:00
Fix pow for negative exponents < 1
This commit is contained in:
parent
f846a5b59e
commit
d9a63396d6
@ -971,7 +971,7 @@ impl KalkValue {
|
||||
) => {
|
||||
if self.has_imaginary()
|
||||
|| imaginary_rhs != &0f64
|
||||
|| (real_rhs > &0f64 && real_rhs < &1f64)
|
||||
|| (real < 0f64 && real_rhs.clone().abs() < 1f64)
|
||||
{
|
||||
let a = real;
|
||||
let b = imaginary;
|
||||
@ -1576,6 +1576,8 @@ mod tests {
|
||||
((0f64, 2f64), (0f64, 3f64), (-0.0043748f64, 0.0078460f64)),
|
||||
((3f64, 2f64), (0f64, 3f64), (-0.1304148f64, -0.111153f64)),
|
||||
((3f64, 2f64), (4f64, 3f64), (28.8577819f64, -2.422530f64)),
|
||||
((-9f64, 0f64), (0.5f64, 0f64), (0f64, 3f64)),
|
||||
((-9f64, 0f64), (-0.5f64, 0f64), (0f64, -1f64 / 3f64)),
|
||||
(
|
||||
(3f64, 0f64),
|
||||
(0f64, 1f64 / 3f64),
|
||||
|
Loading…
Reference in New Issue
Block a user