Skip to documentation
SLOP

tiny.simd.bf16FromF64

Reference tiny.simd bf16FromF64

Defined in BFloat16.

Called byCallsNo direct callersBFloat16fromF32BFloat16fromF64
Static calls · unresolved targets: 0 · external targets: 0.

Source

Source: lib/simd/src/bfloat.zig:18

zig
pub fn fromF64(value: f64) BFloat16 {        const bits: u64 = @bitCast(value);        const rounded_bits = (bits & 0xffff_ffc0_0000_0000) |            ((bits +% 0x0000_003f_ffff_ffff) & 0x0000_0040_0000_0000);        return fromF32(@floatCast(@as(f64, @bitCast(rounded_bits))));    }

Source: lib/simd/src/root.zig:146

zig
pub const bf16FromF64 = BFloat16.fromF64;

Also reachable as

bfloat.BFloat16.fromF64.

Audit

Definitions1
Public names3
Members0
Version26.7.0
Revisiondaab053ee433