Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
c92aff2d
Commit
c92aff2d
authored
Jul 19, 2008
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
SVN=128118
parent
90da636c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
3 additions
and
28 deletions
+3
-28
asin.go
src/lib/math/asin.go
+0
-1
atan.go
src/lib/math/atan.go
+1
-2
floor.go
src/lib/math/floor.go
+2
-3
main.go
src/lib/math/main.go
+0
-2
pow.go
src/lib/math/pow.go
+0
-3
pow10.go
src/lib/math/pow10.go
+0
-17
No files found.
src/lib/math/asin.go
View file @
c92aff2d
...
...
@@ -4,7 +4,6 @@
package
math
import
math
"math"
import
math
"math"
export
asin
,
acos
...
...
src/lib/math/atan.go
View file @
c92aff2d
...
...
@@ -13,7 +13,7 @@ export atan
* argument in the range [-pi/2,pi/2].
* there are no error returns.
* coefficients are #5077 from Hart & Cheney. (19.56D)
*/
*/
const
...
...
@@ -38,7 +38,6 @@ const
* xatan evaluates a series valid in the
* range [-0.414...,+0.414...]. (tan(pi/8))
*/
func
xatan
(
arg
float64
)
float64
{
...
...
src/lib/math/floor.go
View file @
c92aff2d
...
...
@@ -22,10 +22,9 @@ floor(arg float64) float64
if
fract
!=
0.0
{
d
=
d
+
1
;
}
d
=
-
d
;
}
else
{
d
,
fract
=
sys
.
modf
(
d
);
return
-
d
;
}
d
,
fract
=
sys
.
modf
(
d
);
return
d
;
}
...
...
src/lib/math/main.go
View file @
c92aff2d
...
...
@@ -25,13 +25,11 @@ var
tanh
[
length
]
float64
;
)
func
init
();
func
ck
(
a
,
b
float64
);
func
main
()
{
init
();
for
i
:=
0
;
i
<
length
;
i
=
i
+
1
{
f
:=
vf
[
i
];
...
...
src/lib/math/pow.go
View file @
c92aff2d
...
...
@@ -4,9 +4,6 @@
package
math
import
math
"math"
import
math
"math"
import
math
"math"
import
math
"math"
export
pow
...
...
src/lib/math/pow10.go
View file @
c92aff2d
...
...
@@ -16,26 +16,11 @@ export pow10
*/
const
tabsize
=
70
;
var
initdone
bool
;
var
tab
[
tabsize
]
float64
;
//{
// 1.0e0, 1.0e1, 1.0e2, 1.0e3, 1.0e4, 1.0e5, 1.0e6, 1.0e7, 1.0e8, 1.0e9,
// 1.0e10,1.0e11,1.0e12,1.0e13,1.0e14,1.0e15,1.0e16,1.0e17,1.0e18,1.0e19,
// 1.0e20,1.0e21,1.0e22,1.0e23,1.0e24,1.0e25,1.0e26,1.0e27,1.0e28,1.0e29,
// 1.0e30,1.0e31,1.0e32,1.0e33,1.0e34,1.0e35,1.0e36,1.0e37,1.0e38,1.0e39,
// 1.0e40,1.0e41,1.0e42,1.0e43,1.0e44,1.0e45,1.0e46,1.0e47,1.0e48,1.0e49,
// 1.0e50,1.0e51,1.0e52,1.0e53,1.0e54,1.0e55,1.0e56,1.0e57,1.0e58,1.0e59,
// 1.0e60,1.0e61,1.0e62,1.0e63,1.0e64,1.0e65,1.0e66,1.0e67,1.0e68,1.0e69,
//};
func
init
();
func
pow10
(
e
int
)
float64
{
if
!
initdone
{
init
();
}
if
e
<
0
{
return
1
/
pow10
(
-
e
);
}
...
...
@@ -49,8 +34,6 @@ pow10(e int) float64
func
init
()
{
initdone
=
true
;
tab
[
0
]
=
1.0e0
;
tab
[
1
]
=
1.0e1
;
for
i
:=
2
;
i
<
tabsize
;
i
++
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment