| author | |
| committer | |
| log | c7799ff2b237ab0f0ed5ac91d8875f01cb31dde8 |
| tree | 586f4db77b69b47d7de78add29790386d8ff0cd9 |
| parent | 395f3d946ad62eb881796044819194f649742a65 |
1 files changed, 2 insertions(+), 2 deletions(-)
std/math/powi.zig+2-2| ... | ... | @@ -1,7 +1,7 @@ |
| 1 | 1 | // Special Cases: |
| 2 | 2 | // |
| 3 | 3 | // powi(x, +-0) = 1 for any x |
| 4 | // powi(0, y) = 1 for any y | |
| 4 | // powi(0, y) = 0 for any y | |
| 5 | 5 | // powi(1, y) = 1 for any y |
| 6 | 6 | // powi(-1, y) = -1 for for y an odd integer |
| 7 | 7 | // powi(-1, y) = 1 for for y an even integer |
| ... | ... | @@ -29,7 +29,7 @@ pub fn powi(comptime T: type, x: T, y: T) (error.{ |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | switch (x) { |
| 32 | // powi(0, y) = 1 for any y | |
| 32 | // powi(0, y) = 0 for any y | |
| 33 | 33 | 0 => return 0, |
| 34 | 34 | |
| 35 | 35 | // powi(1, y) = 1 for any y |