1
0
mirror of https://github.com/golang/go synced 2024-10-04 21:11:22 -06:00
go/src/math
Robert Griesemer aea224386e math/big: more tests, documentation for Flot gob marshalling
Follow-up to https://golang.org/cl/21755.
This turned out to be a bit more than just a few nits
as originally expected in that CL.

1) The actual mantissa may be shorter than required for the
   given precision (because of trailing 0's): no need to
   allocate space for it (and transmit 0's). This can save
   a lot of space when the precision is high: E.g., for
   prec == 1000, 16 words or 128 bytes are required at the
   most, but if the actual number is short, it may be much
   less (for the test cases present, it's significantly less).

2) The actual mantissa may be longer than the number of
   words required for the given precision: make sure to
   not overflow when encoding in bytes.

3) Add more documentation.

4) Add more tests.

Change-Id: I9f40c408cfdd9183a8e81076d2f7d6c75e7a00e9
Reviewed-on: https://go-review.googlesource.com/22324
Reviewed-by: Alan Donovan <adonovan@google.com>
2016-04-20 21:16:21 +00:00
..
big math/big: more tests, documentation for Flot gob marshalling 2016-04-20 21:16:21 +00:00
cmplx math/cmplx: added clarifying comment 2016-03-21 16:18:38 +00:00
rand testing: implement 'Unordered Output' in Examples. 2016-03-09 04:34:41 +00:00
abs.go math: fix typo and braino in my earlier commit 2015-10-29 21:12:08 +00:00
acosh.go all: single space after period. 2016-03-02 00:13:47 +00:00
all_test.go all: delete dead test code 2016-03-21 07:10:08 +00:00
asin_386.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
asin_amd64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
asin_amd64p32.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
asin_arm.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
asin.go
asinh.go all: single space after period. 2016-03-02 00:13:47 +00:00
atan2_386.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
atan2_amd64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
atan2_amd64p32.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
atan2_arm.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
atan2.go
atan_386.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
atan_amd64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
atan_amd64p32.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
atan_arm.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
atan.go
atanh.go all: single space after period. 2016-03-02 00:13:47 +00:00
bits.go
cbrt.go math: faster Cbrt 2015-02-23 21:04:46 +00:00
const.go math: explain OEIS link 2015-06-26 01:25:58 +00:00
copysign.go
dim_386.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
dim_amd64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
dim_amd64p32.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
dim_arm.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
dim_s390x.s math: add functions and stubs for s390x 2016-04-06 23:35:56 +00:00
dim.go
erf.go all: single space after period. 2016-03-02 00:13:47 +00:00
exp2_386.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
exp2_amd64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
exp2_amd64p32.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
exp2_arm.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
exp_386.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
exp_amd64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
exp_amd64p32.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
exp_arm.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
exp.go all: single space after period. 2016-03-02 00:13:47 +00:00
expm1_386.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
expm1_amd64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
expm1_amd64p32.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
expm1_arm.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
expm1.go all: single space after period. 2016-03-02 00:13:47 +00:00
export_test.go all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
floor_386.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
floor_amd64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
floor_amd64p32.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
floor_arm.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
floor_asm.go math: optimize ceil/floor functions on amd64 2015-10-03 15:55:08 +00:00
floor.go
frexp_386.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
frexp_amd64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
frexp_amd64p32.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
frexp_arm.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
frexp.go
gamma.go all: single space after period. 2016-03-02 00:13:47 +00:00
hypot_386.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
hypot_amd64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
hypot_amd64p32.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
hypot_arm.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
hypot.go
j0.go all: single space after period. 2016-03-02 00:13:47 +00:00
j1.go all: single space after period. 2016-03-02 00:13:47 +00:00
jn.go all: single space after period. 2016-03-02 00:13:47 +00:00
ldexp_386.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
ldexp_amd64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
ldexp_amd64p32.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
ldexp_arm.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
ldexp.go
lgamma.go all: single space after period. 2016-03-02 00:13:47 +00:00
log1p_386.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
log1p_amd64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
log1p_amd64p32.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
log1p_arm.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
log1p.go all: single space after period. 2016-03-02 00:13:47 +00:00
log10_386.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
log10_amd64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
log10_amd64p32.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
log10_arm.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
log10.go math: fix Log2 test failures on ppc64 (and s390) 2015-07-15 05:35:22 +00:00
log_386.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
log_amd64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
log_amd64p32.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
log_arm.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
log.go all: single space after period. 2016-03-02 00:13:47 +00:00
logb.go
mod_386.s
mod_amd64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
mod_amd64p32.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
mod_arm.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
mod.go
modf_386.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
modf_amd64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
modf_amd64p32.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
modf_arm.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
modf.go all: single space after period. 2016-03-02 00:13:47 +00:00
nextafter.go math: change Nextafter64 to Nextafter in the description of Nextafter 2015-02-17 14:29:18 +00:00
pow10.go
pow.go
remainder_386.s
remainder_amd64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
remainder_amd64p32.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
remainder_arm.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
remainder.go all: single space after period. 2016-03-02 00:13:47 +00:00
signbit.go
sin_386.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
sin_amd64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
sin_amd64p32.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
sin_arm.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
sin.go
sincos_386.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
sincos_amd64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
sincos_amd64p32.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
sincos_arm.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
sincos.go
sinh.go
sqrt_386.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
sqrt_amd64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
sqrt_amd64p32.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
sqrt_arm64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
sqrt_arm.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
sqrt_ppc64x.s math: improve sqrt for ppc64le,ppc64 2016-03-10 15:01:21 +00:00
sqrt_s390x.s math: add functions and stubs for s390x 2016-04-06 23:35:56 +00:00
sqrt.go math: delete unused function sqrtC 2016-03-03 02:29:09 +00:00
stubs_arm64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
stubs_mips64x.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
stubs_ppc64x.s math: improve sqrt for ppc64le,ppc64 2016-03-10 15:01:21 +00:00
stubs_s390x.s math: add functions and stubs for s390x 2016-04-06 23:35:56 +00:00
tan_386.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
tan_amd64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
tan_amd64p32.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
tan_arm.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
tan.go
tanh.go
unsafe.go