Closed xiaokentrl closed 1 year ago
Please note that you should fill https://github.com/golang/proposal/blob/master/go2-language-changes.md when proposing a language change.
I'm sorry, I don't understand this proposal. Please at least give some examples.
func decimal[T ~float32 | ~float64](v T) T {
return v % 1
}
:question:
Timed out in state WaitingForInfo. Closing.
(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)
I would like to add a system function called decimal() that facilitates the calculation of integers, floating-point numbers, and negative numbers while developing code. Mathematical calculations have always been essential in computer systems, regardless of the programming language used. Therefore, mathematical calculations should not rely on third-party decimal packages but rather be integrated as a built-in system function in the Go programming language.