FAQ
Hi All,

Is there anyway to represent big digits with multi precision in GO.

Ex: I want to performance all mathematical operations on the below numbers
like A+B , A-B ,A*B ....

A = 123,456,789,012,345,678,901.123
B = 987,654,321,098,765,432,109.876

Thanks and Regards,
Duggineni Haribabu.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.

## Search Discussions

•  at Feb 23, 2015 at 2:33 pm ⇧
See http://golang.org/pkg/math/big

On 23 February 2015 at 14:26, haribabu duggineni
wrote:
Hi All,

Is there anyway to represent big digits with multi precision in GO.

Ex: I want to performance all mathematical operations on the below numbers
like A+B , A-B ,A*B ....

A = 123,456,789,012,345,678,901.123
B = 987,654,321,098,765,432,109.876

Thanks and Regards,
Duggineni Haribabu.

--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
•  at Feb 23, 2015 at 2:39 pm ⇧
Thanks for the response roger peppe. In math package I tried with Big
integers and It works fine. I want to try the same for Big floats like
12345678901234567890*.1234*

On Monday, February 23, 2015 at 5:26:17 PM UTC+3, haribabu duggineni wrote:

Hi All,

Is there anyway to represent big digits with multi precision in GO.

Ex: I want to performance all mathematical operations on the below numbers
like A+B , A-B ,A*B ....

A = 123,456,789,012,345,678,901.123
B = 987,654,321,098,765,432,109.876

Thanks and Regards,
Duggineni Haribabu.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
•  at Feb 23, 2015 at 2:48 pm ⇧

On Mon, Feb 23, 2015 at 6:39 AM, haribabu duggineni wrote:

Thanks for the response roger peppe. In math package I tried with Big
integers and It works fine. I want to try the same for Big floats like
12345678901234567890.1234
On tip the math/big package supports floating point numbers. This
will be in the future Go 1.5 release. You should be able to copy the
package out to use it with Go 1.4 under a different name.

Ian

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
•  at Feb 23, 2015 at 4:34 pm ⇧

On Monday, 23 February 2015 14:48:29 UTC, Ian Lance Taylor wrote:
On Mon, Feb 23, 2015 at 6:39 AM, haribabu duggineni
<dugginen...@gmail.com <javascript:>> wrote:
Thanks for the response roger peppe. In math package I tried with Big
integers and It works fine. I want to try the same for Big floats like
12345678901234567890.1234
On tip the math/big package supports floating point numbers.
Note there's also the Rat type. Where exact representation of rational
numbers is needed (such as finance), this may be more suitable.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
•  at Feb 23, 2015 at 2:55 pm ⇧
Thanks Ian.

On Monday, February 23, 2015 at 5:26:17 PM UTC+3, haribabu duggineni wrote:

Hi All,

Is there anyway to represent big digits with multi precision in GO.

Ex: I want to performance all mathematical operations on the below numbers
like A+B , A-B ,A*B ....

A = 123,456,789,012,345,678,901.123
B = 987,654,321,098,765,432,109.876

Thanks and Regards,
Duggineni Haribabu.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.

## Related Discussions

Discussion Overview
 group golang-nuts categories go posted Feb 23, '15 at 2:26p active Feb 23, '15 at 4:34p posts 6 users 4 website golang.org

### 4 users in discussion

Content

People

Support

Translate

site design / logo © 2022 Grokbase