Source/Packages

Data.BFloat16

packages/foundation/standard/src/Data/BFloat16.alpha

30 lines2 declarations1.4 KiBSHA-256 7843694b7eb4

def · lines 27–30

bfloat16WidenWord

Full file
Widen the low sixteen wire bits without rounding. BF16 has the binary32 sign and exponent positions with seven explicit fraction bits; appending sixteen zero fraction bits preserves signed zero, subnormals and payloads.
27def bfloat16WidenWord =
28  (lambda unrestricted half : Nat .
29    (naturalMultiply (naturalModuloUnchecked half (naturalPowerOfTwo 16))
30      (naturalPowerOfTwo 16)))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.