Robert Griesemer
3478891d12
gofmt -s -w src misc
...
R=r, rsc
CC=golang-dev
https://golang.org/cl/2662041
2010-10-22 10:06:33 -07:00
Charles L. Dorian
b233ac8f18
math: Fix off-by-one error in Ilogb and Logb.
...
Fixes #1141 .
R=rsc
CC=adg, golang-dev
https://golang.org/cl/2194047
2010-09-28 10:15:21 -04:00
Rob Pike
1959c3ac5b
tests: fix prints
...
- delete unnecessary newlines
- make sure formatted prints call the formatting routines
R=adg
CC=golang-dev
https://golang.org/cl/2225046
2010-09-23 13:48:56 +10:00
Russ Cox
6e6fc67425
math: make portable Tan(Pi/2) return NaN
...
The panic NaN was a translation error.
The earliest version said panic "return sys.NaN()",
and when sys.NaN came along, it changed
to "panic sys.NaN()" instead of "return sys.NaN()".
R=r
CC=golang-dev
https://golang.org/cl/2106049
2010-09-11 23:41:25 -04:00
Charles L. Dorian
bead166a7c
math: amd64 version of Sincos
...
R=rsc
CC=golang-dev
https://golang.org/cl/1939042
2010-08-26 19:03:58 -04:00
Russ Cox
da392d9136
build: no required environment variables
...
R=adg, r, PeterGo
CC=golang-dev
https://golang.org/cl/1942044
2010-08-18 10:08:49 -04:00
Charles L. Dorian
c8c2bdbc59
math: fix amd64 Hypot.
...
Underflow/overflow tests for exp_amd64.s
Fixes #957 .
R=rsc
CC=golang-dev
https://golang.org/cl/1817041
2010-08-06 16:50:48 -07:00
Charles L. Dorian
c28bd5445c
math: amd64 version of log
...
Benchmarks 25ns/op (was 58ns/op) on 2.53GHz Intel Core 2 Duo.
R=rsc
CC=golang-dev
https://golang.org/cl/1740043
2010-07-12 11:30:11 -07:00
Charles L. Dorian
a0117bafa0
math: amd64 versions of exp and fabs
...
Benchmark of exp to 28 ns/op from 64 ns/op,
on 2.53GHz Intel Core 2 Duo.
R=rsc
CC=golang-dev
https://golang.org/cl/1594041
2010-06-30 14:44:27 -07:00
Russ Cox
565b5dc076
gc: new typechecking rules
...
* Code for assignment, conversions now mirrors spec.
* Changed some snprint -> smprint.
* Renamed runtime functions to separate
interface conversions from type assertions:
convT2I, assertI2T, etc.
* Correct checking of \U sequences.
Fixes #840 .
Fixes #830 .
Fixes #778 .
R=ken2
CC=golang-dev
https://golang.org/cl/1303042
2010-06-08 18:50:02 -07:00
Charles L. Dorian
3fb8d2ad84
math: fix typo in Exp2 benchmark
...
Was timing Exp, not Exp2.
R=rsc, r
CC=golang-dev
https://golang.org/cl/1521042
2010-06-03 15:04:22 -07:00
Charles L. Dorian
3d4c97b82c
math: Pow special cases (signed zero, IEEE 754-2008)
...
Also added more tests for acosh, hypot, log, log10, log2
in all_test.go.
R=rsc
CC=golang-dev
https://golang.org/cl/1417041
2010-06-02 20:55:47 -07:00
Charles L. Dorian
809479740f
math: amd64 versions of fdim, fmax, fmin
...
Uses the SSE2 max, min instructions. Also shorter sqrt_amd64.s
R=rsc
CC=golang-dev
https://golang.org/cl/1216042
2010-05-18 22:33:50 -07:00
Charles L. Dorian
879241d819
math: signed zero Sqrt special case
...
IEEE 754 says: sqrt(-0) = -0
R=rsc
CC=golang-dev
https://golang.org/cl/1098041
2010-05-18 22:16:01 -07:00
Charles L. Dorian
37089cce67
math: fix typo in Cbrt description
...
R=rsc
CC=golang-dev
https://golang.org/cl/979043
2010-05-02 23:33:08 -07:00
Charles L. Dorian
22f84c5b2a
math: more special cases for signed zero
...
R=rsc
CC=golang-dev
https://golang.org/cl/937042
2010-04-26 22:44:39 -07:00
Charles L. Dorian
3c3e68ba32
math: use ** for exponentiation in comments
...
R=rsc
CC=golang-dev
https://golang.org/cl/908041
2010-04-09 14:37:33 -07:00
Charles L. Dorian
9aa8f95ba8
math: atan2 special cases (negative zero)
...
Added Signbit(), revised Copysign()
R=rsc
CC=golang-dev
https://golang.org/cl/822045
2010-04-08 13:24:04 -07:00
Charles L. Dorian
1ec91c8d1d
math: add J1, Y1, Jn and Yn (Bessel functions)
...
Also amend j0.go (variable name conflict, small corrections).
R=rsc
CC=golang-dev
https://golang.org/cl/769041
2010-03-26 14:09:39 -07:00
Charles L. Dorian
6b6c3993d5
math: add J0 and Y0 (Bessel functions)
...
R=rsc
CC=golang-dev
https://golang.org/cl/661044
2010-03-24 09:25:49 -07:00
Charles L. Dorian
26f0c83eb8
math: add Gamma function
...
R=rsc
CC=golang-dev
https://golang.org/cl/649041
2010-03-19 15:29:22 -07:00
Robert Griesemer
8107cad45a
math, path: minor comment fixes
...
R=r
CC=golang-dev
https://golang.org/cl/444043
2010-03-11 16:40:32 -08:00
Robert Griesemer
2a62195153
math package: minor documentation fix
...
R=rsc
CC=golang-dev
https://golang.org/cl/424041
2010-03-10 17:04:43 -08:00
Charles L. Dorian
067fe2840b
math: faster hypot
...
Use hardware sqrt for faster hypot; preserve software-only
hypot as hypotGo (like sqrtGo); enable benchmarking of
hypotGo.
R=rsc
CC=golang-dev
https://golang.org/cl/229049
2010-03-05 16:45:39 -08:00
Robert Griesemer
a145829873
frexp.go: remove html from comment
...
R=r
CC=golang-dev
https://golang.org/cl/250041
2010-03-05 10:30:50 -08:00
Charles L. Dorian
6b80a5fa6d
math: added ilogb, logb, remainder, tests and special conditions
...
Also added expm1_386 and remainder_386; shortened exp_386
R=rsc
CC=golang-dev
https://golang.org/cl/217109
2010-03-03 18:17:13 -08:00
Robert Griesemer
dbe0b57012
go/printer, gofmt: correct indentation after certain /*-style comments
...
- 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 #628 .
R=rsc
CC=golang-dev
https://golang.org/cl/223054
2010-02-25 13:47:16 -08:00
Charles L. Dorian
78e918ccba
math: add lgamma; in-line special cases of acosh, nextafter
...
Added lgamma.go, tests and special cases.
R=rsc
CC=golang-dev
https://golang.org/cl/217060
2010-02-22 17:12:48 -08:00
Charles L. Dorian
c3fa32c747
math: add Cbrt and Sincos; x87 versions of Sincos, Frexp, Ldexp
...
Added special condition and benchmarks for Cbrt, Sincos. Took Frexp and Ldexp out of bits.go.
R=rsc
CC=golang-dev
https://golang.org/cl/206084
2010-02-18 23:33:15 -08:00
Charles L. Dorian
aee1434193
math: add Exp2; 386 FPU versions of Exp2 and Log1p
...
Added tests and benchmarks for Exp2 (special cases same
as Exp). Log1p also enhances speed of inverse hyperbolics.
R=rsc
CC=golang-dev
https://golang.org/cl/206058
2010-02-10 00:06:41 -08:00
Charles L. Dorian
c465331262
math: add functions Log2, Nextafter, Fdim, Fmax, Fmin
...
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
https://golang.org/cl/204069
2010-02-09 13:33:12 -08:00
Charles L. Dorian
072b560ee6
math: Atan2 special cases and tests; atan2_386
...
Added special cases, tests and benchmarks for Atan2;
added 386 FPU version of Atan2.
R=rsc
CC=golang-dev
https://golang.org/cl/201068
2010-02-05 14:55:19 -08:00
Charles L. Dorian
04217ee54e
math: special cases for Modf, Frexp and Ldexp; added Modf_386
...
Also moved Modf from bits.go into modf.go and added timing tests.
R=rsc
CC=golang-dev
https://golang.org/cl/202042
2010-02-05 00:41:30 -08:00
Russ Cox
b13b80e555
math: change Cosh test to close, not veryclose (needed on some x86 chips)
...
R=r
CC=Charlie Dorian, golang-dev
https://golang.org/cl/199054
2010-02-01 22:46:37 -08:00
Charles L. Dorian
a0690b69da
math: add functions; update tests and special cases
...
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
https://golang.org/cl/195052
2010-02-01 22:21:40 -08:00
Devon H. O'Dell
4ffbff14b3
math: Change veryclose to close for Sinh and Exp tests.
...
Fixes #550 .
R=rsc
CC=eds, golang-dev, jtomaschke
https://golang.org/cl/196063
2010-01-29 12:54:05 -08:00
Charles L. Dorian
d4ca006334
math: 386 FPU hypot
...
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
https://golang.org/cl/186180
2010-01-26 12:53:02 -08:00
Russ Cox
718be3215f
in C and asm, replace pkg·name with ·name
...
(eliminate assumption of package global name space,
make code easier to move between packages).
R=r
CC=golang-dev
https://golang.org/cl/194072
2010-01-25 18:52:55 -08:00
Charles L. Dorian
9a6b8e21e4
math: special cases for Hypot
...
Added special case tests to all_test.go. Added tests to hypot.go,
otherwise hangs.
R=rsc
CC=golang-dev
https://golang.org/cl/186118
2010-01-15 13:21:47 -08:00
Charles L. Dorian
7f11db5ea9
math: 386 FPU functions
...
sin, cos, tan, asin, acos, atan, exp, log, log10,
floor, ceil, and fabs
R=rsc
CC=golang-dev
https://golang.org/cl/189083
2010-01-15 13:21:36 -08:00
Charles L. Dorian
46206c52e3
math: special cases for Ceil, Exp, Floor, Log, Log10
...
Added special case tests to all_test.go. Added tests to Floor,
in-lined tests in Exp and Log.
R=rsc
CC=golang-dev
https://golang.org/cl/184081
2010-01-11 21:28:02 -08:00
Charles L. Dorian
3c7534104a
math: special cases for Fmod
...
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
https://golang.org/cl/186076
2010-01-11 16:20:51 -08:00
Rob Pike
00e2cda624
Clean up and make consistent the comments in the math package.
...
R=rsc
CC=golang-dev
https://golang.org/cl/186042
2010-01-12 07:38:31 +11:00
Russ Cox
093146b920
math: fix pow10 comment, test portable Sqrt
...
R=r
CC= golang-dev, Charlie Dorian, golang-dev
https://golang.org/cl/184058
2010-01-11 11:25:37 -08:00
Charles L. Dorian
5336cd8f91
math: Sqrt using 386 FPU.
...
Note: sqrt_decl.go already in src/pkg/math/.
R=rsc
CC=golang-dev
https://golang.org/cl/183155
2010-01-10 15:41:07 -08:00
Charles L. Dorian
fd1db67e87
math: special cases for Atan, Asin and Acos
...
Added tests for NaN and out-of-range values.
Combined asin.go and atan.go into atan.go.
R=rsc
CC=golang-dev
https://golang.org/cl/180065
2010-01-08 14:12:10 -08:00
Charles L. Dorian
d5bcf7bf41
math: special cases for Pow
...
R=rsc
CC=golang-dev
https://golang.org/cl/176064
2009-12-15 20:43:12 -08:00
Russ Cox
1e9e7ec4b3
math: faster, easier to inline IsNaN, IsInf
...
R=r
CC=golang-dev
https://golang.org/cl/180046
2009-12-15 17:21:01 -08:00
Robert Griesemer
a3d1045fb7
1) Change default gofmt default settings for
...
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
https://golang.org/cl/180048
2009-12-15 15:35:38 -08:00
Ken Thompson
bd80b5a835
test case for large angles in trig functions
...
R=rsc
https://golang.org/cl/157160
2009-11-24 15:42:46 -08:00