aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/math/log1p.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/math/log1p.go')
-rw-r--r--libgo/go/math/log1p.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/libgo/go/math/log1p.go b/libgo/go/math/log1p.go
index ef1c7de..044495a 100644
--- a/libgo/go/math/log1p.go
+++ b/libgo/go/math/log1p.go
@@ -97,6 +97,9 @@ package math
func libc_log1p(float64) float64
func Log1p(x float64) float64 {
+ if x == 0 {
+ return x
+ }
return libc_log1p(x)
}