Standard library / math

math.Nextafter32()

Adjacent float32 representable value in direction y. Expected stdout: '1.0000001\n'.

Formal Syntax & Structure

go syntaxgo
func Nextafter32(x, y float32) (r float32)

Parameters & Attributes

NameTypeDescription
xfloat32First input operand (or sole input if unary).
yfloat32Second input operand.

Return Value

(r float32)

Adjacent float32 representable value in direction y.

Working Example

Example Snippetgo
package main
import (  "fmt"  "math")
func main() {  fmt.Println(math.Nextafter32(1, 2))}
Go Reference