mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 22:35:24 +00:00
pow: fix typo 0 instead of inf
This commit is contained in:
parent
0cd31fc7ff
commit
95fdbc579f
@ -59,7 +59,7 @@ pub fn pow(comptime T: type, x: T, y: T) T {
|
||||
|
||||
if (x == 0) {
|
||||
if (y < 0) {
|
||||
// pow(+-0, y) = +- 0 for y an odd integer
|
||||
// pow(+-0, y) = +-inf for y an odd integer
|
||||
if (isOddInteger(y)) {
|
||||
return math.copysign(math.inf(T), x);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user