OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgo/] [go/] [math/] [log10.go] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 747 jeremybenn
// Copyright 2009 The Go Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style
3
// license that can be found in the LICENSE file.
4
 
5
package math
6
 
7
// Log10 returns the decimal logarithm of x.
8
// The special cases are the same as for Log.
9
 
10
//extern log10
11
func libc_log10(float64) float64
12
 
13
func Log10(x float64) float64 {
14
        return libc_log10(x)
15
}
16
 
17
func log10(x float64) float64 {
18
        return Log(x) * (1 / Ln10)
19
}
20
 
21
// Log2 returns the binary logarithm of x.
22
// The special cases are the same as for Log.
23
 
24
func Log2(x float64) float64 {
25
        return log2(x)
26
}
27
 
28
func log2(x float64) float64 {
29
        return Log(x) * (1 / Ln2)
30
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.