summaryrefslogtreecommitdiff
path: root/src/pkg/math/all_test.go
AgeCommit message (Collapse)AuthorFilesLines
2011-02-14Imported Upstream version 2011-02-01.1upstream/2011-02-01.1Ondřej Surý1-1/+117
2011-01-17Imported Upstream version 2011.01.12upstream/2011.01.12Ondřej Surý1-325/+375
2010-06-30math: amd64 versions of exp and fabsCharles L. Dorian1-6/+12
Benchmark of exp to 28 ns/op from 64 ns/op, on 2.53GHz Intel Core 2 Duo. R=rsc CC=golang-dev http://codereview.appspot.com/1594041 Committer: Russ Cox <rsc@golang.org>
2010-06-03math: fix typo in Exp2 benchmarkCharles L. Dorian1-1/+1
Was timing Exp, not Exp2. R=rsc, r CC=golang-dev http://codereview.appspot.com/1521042 Committer: Rob Pike <r@golang.org>
2010-06-02math: Pow special cases (signed zero, IEEE 754-2008)Charles L. Dorian1-163/+203
Also added more tests for acosh, hypot, log, log10, log2 in all_test.go. R=rsc CC=golang-dev http://codereview.appspot.com/1417041 Committer: Russ Cox <rsc@golang.org>
2010-05-18math: signed zero Sqrt special caseCharles L. Dorian1-2/+9
IEEE 754 says: sqrt(-0) = -0 R=rsc CC=golang-dev http://codereview.appspot.com/1098041 Committer: Russ Cox <rsc@golang.org>
2010-04-26math: more special cases for signed zeroCharles L. Dorian1-152/+393
R=rsc CC=golang-dev http://codereview.appspot.com/937042 Committer: Russ Cox <rsc@golang.org>
2010-04-08math: atan2 special cases (negative zero)Charles L. Dorian1-2/+63
Added Signbit(), revised Copysign() R=rsc CC=golang-dev http://codereview.appspot.com/822045 Committer: Russ Cox <rsc@golang.org>
2010-03-26math: add J1, Y1, Jn and Yn (Bessel functions)Charles L. Dorian1-4/+198
Also amend j0.go (variable name conflict, small corrections). R=rsc CC=golang-dev http://codereview.appspot.com/769041 Committer: Russ Cox <rsc@golang.org>
2010-03-24math: add J0 and Y0 (Bessel functions)Charles L. Dorian1-0/+90
R=rsc CC=golang-dev http://codereview.appspot.com/661044 Committer: Russ Cox <rsc@golang.org>
2010-03-19math: add Gamma functionCharles L. Dorian1-0/+46
R=rsc CC=golang-dev http://codereview.appspot.com/649041 Committer: Russ Cox <rsc@golang.org>
2010-03-05math: faster hypotCharles L. Dorian1-0/+6
Use hardware sqrt for faster hypot; preserve software-only hypot as hypotGo (like sqrtGo); enable benchmarking of hypotGo. R=rsc CC=golang-dev http://codereview.appspot.com/229049 Committer: Russ Cox <rsc@golang.org>
2010-03-03math: added ilogb, logb, remainder, tests and special conditionsCharles L. Dorian1-1/+108
Also added expm1_386 and remainder_386; shortened exp_386 R=rsc CC=golang-dev http://codereview.appspot.com/217109 Committer: Russ Cox <rsc@golang.org>
2010-02-25go/printer, gofmt: correct indentation after certain /*-style commentsRobert Griesemer1-1/+1
- applied gofmt to src and misc Note: This fix improved formatting of src/pkg/math/all_test.go but leads to a degradation in src/pkg/exp/4s/xs.go. The latter happened to "work" before accidentally. Fixing the alignment in that case in general will be a separate CL. Fixes issue 628. R=rsc CC=golang-dev http://codereview.appspot.com/223054
2010-02-22math: add lgamma; in-line special cases of acosh, nextafterCharles L. Dorian1-1/+46
Added lgamma.go, tests and special cases. R=rsc CC=golang-dev http://codereview.appspot.com/217060 Committer: Russ Cox <rsc@golang.org>
2010-02-18math: add Cbrt and Sincos; x87 versions of Sincos, Frexp, LdexpCharles L. Dorian1-5/+72
Added special condition and benchmarks for Cbrt, Sincos. Took Frexp and Ldexp out of bits.go. R=rsc CC=golang-dev http://codereview.appspot.com/206084 Committer: Russ Cox <rsc@golang.org>
2010-02-10math: add Exp2; 386 FPU versions of Exp2 and Log1pCharles L. Dorian1-0/+31
Added tests and benchmarks for Exp2 (special cases same as Exp). Log1p also enhances speed of inverse hyperbolics. R=rsc CC=golang-dev http://codereview.appspot.com/206058 Committer: Russ Cox <rsc@golang.org>
2010-02-09math: add functions Log2, Nextafter, Fdim, Fmax, FminCharles L. Dorian1-1/+132
Add functions, tests and benchmarks. Fix typos in comments in expm1 and hypot_386. Fix Acosh domain error in benchmark test. R=rsc CC=golang-dev http://codereview.appspot.com/204069 Committer: Russ Cox <rsc@golang.org>
2010-02-05math: Atan2 special cases and tests; atan2_386Charles L. Dorian1-0/+89
Added special cases, tests and benchmarks for Atan2; added 386 FPU version of Atan2. R=rsc CC=golang-dev http://codereview.appspot.com/201068 Committer: Russ Cox <rsc@golang.org>
2010-02-05math: special cases for Modf, Frexp and Ldexp; added Modf_386Charles L. Dorian1-1/+113
Also moved Modf from bits.go into modf.go and added timing tests. R=rsc CC=golang-dev http://codereview.appspot.com/202042 Committer: Russ Cox <rsc@golang.org>
2010-02-01math: change Cosh test to close, not veryclose (needed on some x86 chips)Russ Cox1-1/+1
R=r CC=Charlie Dorian, golang-dev http://codereview.appspot.com/199054
2010-02-01math: add functions; update tests and special casesCharles L. Dorian1-141/+644
Added special cases to comments for asin.go and fabs.go. Added Trunc() to floor.go and floor_386.s. Fixed formatting error in hypot_386.s Added new functions Acosh, Asinh, Atanh, Copysign, Erf, Erfc, Expm1, and Log1p. Added 386 FPU version of Fmod. Added tests, benchmarks, and precision to expected results in all_test.go. Edited makefile so it all compiles. R=rsc CC=golang-dev http://codereview.appspot.com/195052 Committer: Russ Cox <rsc@golang.org>
2010-01-29math: Change veryclose to close for Sinh and Exp tests.Devon H. O'Dell1-2/+2
Fixes issue 550. R=rsc CC=eds, golang-dev, jtomaschke http://codereview.appspot.com/196063 Committer: Russ Cox <rsc@golang.org>
2010-01-26math: 386 FPU hypotCharles L. Dorian1-3/+3
Added 386 FPU version of Hypot; modified all_test.go to test Hypot with large arguments. Also edited sqrt.go to remove Sqrt(0) as a special case. R=rsc CC=golang-dev http://codereview.appspot.com/186180 Committer: Russ Cox <rsc@golang.org>
2010-01-15math: special cases for HypotCharles L. Dorian1-23/+81
Added special case tests to all_test.go. Added tests to hypot.go, otherwise hangs. R=rsc CC=golang-dev http://codereview.appspot.com/186118 Committer: Russ Cox <rsc@golang.org>
2010-01-11math: special cases for Ceil, Exp, Floor, Log, Log10Charles L. Dorian1-1/+87
Added special case tests to all_test.go. Added tests to Floor, in-lined tests in Exp and Log. R=rsc CC=golang-dev http://codereview.appspot.com/184081 Committer: Russ Cox <rsc@golang.org>
2010-01-11math: special cases for FmodCharles L. Dorian1-1/+112
Added special case tests to all_test.go for Fmod. Fixed Fmod [hung for Fmod(+/-Inf, <finite>)]. Also added test for Ceil in all_test.go. R=rsc CC=golang-dev http://codereview.appspot.com/186076 Committer: Russ Cox <rsc@golang.org>
2010-01-11math: fix pow10 comment, test portable SqrtRuss Cox1-4/+7
R=r CC= golang-dev, Charlie Dorian, golang-dev http://codereview.appspot.com/184058
2010-01-10math: Sqrt using 386 FPU.Charles L. Dorian1-0/+6
Note: sqrt_decl.go already in src/pkg/math/. R=rsc CC=golang-dev http://codereview.appspot.com/183155 Committer: Russ Cox <rsc@golang.org>
2010-01-08math: special cases for Atan, Asin and AcosCharles L. Dorian1-33/+74
Added tests for NaN and out-of-range values. Combined asin.go and atan.go into atan.go. R=rsc CC=golang-dev http://codereview.appspot.com/180065 Committer: Russ Cox <rsc@golang.org>
2009-12-15math: special cases for PowCharles L. Dorian1-0/+152
R=rsc CC=golang-dev http://codereview.appspot.com/176064 Committer: Russ Cox <rsc@golang.org>
2009-12-151) Change default gofmt default settings forRobert Griesemer1-25/+25
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 3rd set of files. R=rsc CC=golang-dev http://codereview.appspot.com/180048
2009-11-24test case for large angles in trig functionsKen Thompson1-0/+37
R=rsc http://codereview.appspot.com/157160
2009-11-15gc: five bug fixes, one better error.Russ Cox1-0/+27
* check for struct literal assignment to private fields. * record, fix crash involving parallel map assignment. * avoid infinite recursion in exportassignok. * make floating point bounds check precise. * avoid crash on invalid receiver. * add context to error about implicit assignment. Fixes issue 86. Fixes issue 88. Fixes issue 158. Fixes issue 174. Fixes issue 201. Fixes issue 204. R=ken2 http://codereview.appspot.com/154144
2009-11-09- replaced gofmt expression formatting algorithm withRobert Griesemer1-4/+4
rsc's algorithm - applied gofmt -w misc src - partial CL (last chunk) R=rsc, r http://go/go-review/1024041
2009-11-09remove semis after statements in one-statement statement listsRobert Griesemer1-15/+15
R=rsc, r http://go/go-review/1025029
2009-11-06- fine-tuning of one-line func heuristic (nodes.go)Robert Griesemer1-6/+2
- enabled for function declarations (not just function literals) - applied gofmt -w $GOROOT/src (look for instance at src/pkg/debug/elf/elf.go) R=r, rsc CC=go-dev http://go/go-review/1026006
2009-11-05gofmt-ify math, expvar, exp/spacewarRobert Griesemer1-2/+2
R=rsc http://go/go-review/1018061
2009-10-06apply gofmt to malloc math once osRuss Cox1-137/+137
R=gri DELTA=566 (4 added, 14 deleted, 548 changed) OCL=35410 CL=35419
2009-08-12convert low-level (used by testing) packages toRuss Cox1-2/+2
whole-package compilation. new Makefiles, tests now in separate package bytes flag fmt io math once os reflect strconv sync time utf8 delete import "xxx" in package xxx. inside package xxx, xxx is not declared anymore so s/xxx.//g delete file and package level forward declarations. note the new internal_test.go and sync and strconv to provide public access to internals during testing. the installed version of the package omits that file and thus does not open the internals to all clients. R=r OCL=33065 CL=33097
2009-08-10remove unnecessary pkg. referencesRuss Cox1-29/+29
R=r DELTA=95 (0 added, 0 deleted, 95 changed) OCL=33012 CL=33012
2009-06-09mv src/lib to src/pkgRob Pike1-0/+278
tests: all.bash passes, gobuild still works, godoc still works. R=rsc OCL=30096 CL=30102