gonum: gonum.org/v1/gonum/internal/math32 Index | Files

package math32

import "gonum.org/v1/gonum/internal/math32"

Package math32 provides float32 versions of standard library math package routines used by gonum/blas/native.

Index

Package Files

doc.go math.go signbit.go sqrt_amd64.go

func Abs Uses

func Abs(x float32) float32

Abs returns the absolute value of x.

Special cases are:

Abs(±Inf) = +Inf
Abs(NaN) = NaN

func Copysign Uses

func Copysign(x, y float32) float32

Copysign returns a value with the magnitude of x and the sign of y.

func Hypot Uses

func Hypot(p, q float32) float32

Hypot returns Sqrt(p*p + q*q), taking care to avoid unnecessary overflow and underflow.

Special cases are:

Hypot(±Inf, q) = +Inf
Hypot(p, ±Inf) = +Inf
Hypot(NaN, q) = NaN
Hypot(p, NaN) = NaN

func Inf Uses

func Inf(sign int) float32

Inf returns positive infinity if sign >= 0, negative infinity if sign < 0.

func IsInf Uses

func IsInf(f float32, sign int) bool

IsInf reports whether f is an infinity, according to sign. If sign > 0, IsInf reports whether f is positive infinity. If sign < 0, IsInf reports whether f is negative infinity. If sign == 0, IsInf reports whether f is either infinity.

func IsNaN Uses

func IsNaN(f float32) (is bool)

IsNaN reports whether f is an IEEE 754 “not-a-number” value.

func NaN Uses

func NaN() float32

NaN returns an IEEE 754 “not-a-number” value.

func Signbit Uses

func Signbit(x float32) bool

Signbit returns true if x is negative or negative zero.

func Sqrt Uses

func Sqrt(x float32) float32

Sqrt returns the square root of x.

Special cases are:

Sqrt(+Inf) = +Inf
Sqrt(±0) = ±0
Sqrt(x < 0) = NaN
Sqrt(NaN) = NaN

Package math32 imports 1 packages (graph) and is imported by 2 packages. Updated 2019-01-30. Refresh now. Tools for package owners.