INNER CODE UNIT · Go

r

ericlagergren/decimal · big.go:478

			r = -r
		}
		return r
	}
}

// ord returns similar to Sign except -Inf is -2 and +Inf is +2.
func (x *Big) ord(abs bool) int {
	if x.form&inf != 0 {
		if x.form == pinf || abs {
			return +2
		}
		return -2
	}
	r := x.Sign()
	if abs && r < 0 {
		r = -r
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…