aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/math/erf.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2017-09-14 17:11:35 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2017-09-14 17:11:35 +0000
commitbc998d034f45d1828a8663b2eed928faf22a7d01 (patch)
tree8d262a22ca7318f4bcd64269fe8fe9e45bcf8d0f /libgo/go/math/erf.go
parenta41a6142df74219f596e612d3a7775f68ca6e96f (diff)
downloadgcc-bc998d034f45d1828a8663b2eed928faf22a7d01.zip
gcc-bc998d034f45d1828a8663b2eed928faf22a7d01.tar.gz
gcc-bc998d034f45d1828a8663b2eed928faf22a7d01.tar.bz2
libgo: update to go1.9
Reviewed-on: https://go-review.googlesource.com/63753 From-SVN: r252767
Diffstat (limited to 'libgo/go/math/erf.go')
-rw-r--r--libgo/go/math/erf.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/libgo/go/math/erf.go b/libgo/go/math/erf.go
index 8ddd5f9..e2a0422 100644
--- a/libgo/go/math/erf.go
+++ b/libgo/go/math/erf.go
@@ -186,6 +186,13 @@ const (
// Erf(-Inf) = -1
// Erf(NaN) = NaN
func Erf(x float64) float64 {
+ return libc_erf(x)
+}
+
+//extern erf
+func libc_erf(float64) float64
+
+func erf(x float64) float64 {
const (
VeryTiny = 2.848094538889218e-306 // 0x0080000000000000
Small = 1.0 / (1 << 28) // 2**-28
@@ -263,6 +270,13 @@ func Erf(x float64) float64 {
// Erfc(-Inf) = 2
// Erfc(NaN) = NaN
func Erfc(x float64) float64 {
+ return libc_erfc(x)
+}
+
+//extern erfc
+func libc_erfc(float64) float64
+
+func erfc(x float64) float64 {
const Tiny = 1.0 / (1 << 56) // 2**-56
// special cases
switch {