Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WasmCompatMax ¶
WasmCompatMax is the Wasm spec compatible variant of math.Max
This returns math.NaN if either parameter is math.NaN, even if the other is math.Inf.
See https://github.com/golang/go/blob/1d20a362d0ca4898d77865e314ef6f73582daef0/src/math/dim.go#L42-L59
func WasmCompatMin ¶
WasmCompatMin is the Wasm spec compatible variant of math.Min
This returns math.NaN if either parameter is math.NaN, even if the other is -math.Inf.
See https://github.com/golang/go/blob/1d20a362d0ca4898d77865e314ef6f73582daef0/src/math/dim.go#L74-L91
func WasmCompatNearestF32 ¶
WasmCompatNearestF32 is the Wasm spec compatible variant of math.Round, used for Nearest instruction. For example, this converts 1.9 to 2.0, and this has the semantics of LLVM's rint intrinsic.
Ex. math.Round(-4.5) results in -5 while this results in -4.
func WasmCompatNearestF64 ¶
WasmCompatNearestF64 is the Wasm spec compatible variant of math.Round, used for Nearest instruction. For example, this converts 1.9 to 2.0, and this has the semantics of LLVM's rint intrinsic.
Ex. math.Round(-4.5) results in -5 while this results in -4.
Types ¶
This section is empty.