]> Cypherpunks repositories - gostls13.git/commit
math/big: use internal square for Rat
authorBrian Kessler <brian.m.kessler@gmail.com>
Fri, 18 Aug 2017 06:44:34 +0000 (23:44 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 18 Aug 2017 12:47:46 +0000 (12:47 +0000)
commitfe08ebaebb09cb0c45e3728a96d494f7f9f5c1b3
tree89a180b485bd2af4d88a1ec504e5b2c5b6cc28b8
parent66a1d37bf78b75f4b3f20e67ecf34be5c996f61e
math/big: use internal square for Rat

updates #13745

A squared rational is always positive and can not
be reduced since the numerator and denominator had
no previous common factors.  The nat multiplication
can be performed using the internal sqr method.

Change-Id: I558f5b38e379bfd26ff163c9489006d7e5a9cfaa
Reviewed-on: https://go-review.googlesource.com/56776
Reviewed-by: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/math/big/rat.go