Ask Your Question
3

Does Go have a conventional method for performing precise division?

asked 2023-05-21 06:33:49 +0000

bukephalos gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-05-21 06:53:01 +0000

lalupa gravatar image

Yes, Go has a conventional method for performing precise division using the math/big package. This package provides arbitrary-precision arithmetic operations, including division. The Div() method of the big package performs integer division and returns both the quotient and remainder. The Quo() method performs division on big.Int numbers and returns a big.Rat number representing the exact quotient.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-21 06:33:49 +0000

Seen: 7 times

Last updated: May 21 '23