1 // Copyright 2009-2010 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.
7 // Floor returns the greatest integer value less than or equal to x.
15 func libc_floor(float64) float64
17 func Floor(x
float64) float64 {
21 func floor(x
float64) float64 {
22 if x
== 0 ||
IsNaN(x
) ||
IsInf(x
, 0) {
36 // Ceil returns the least integer value greater than or equal to x.
44 func libc_ceil(float64) float64
46 func Ceil(x
float64) float64 {
50 func ceil(x
float64) float64 {
54 // Trunc returns the integer value of x.
61 func Trunc(x
float64) float64 {
65 func trunc(x
float64) float64 {
66 if x
== 0 ||
IsNaN(x
) ||
IsInf(x
, 0) {