1234567891011121314151617typet=Unsigned.UInt32.tletof_bitsx=xletto_bitsx=xletof_intx=ifxland0xffff=xthenUnsigned.UInt32.(shift_left(of_intx)16)elseFmt.invalid_arg"%d out-of-range for a 16.16 fixed value"xletof_floatx=ifx<0.||x>=0x10000.0thenFmt.invalid_arg"%g out-of-range for a 16.16 fixed value"xelseUnsigned.UInt64.to_uint32(Unsigned.UInt64.of_int64(Int64.of_float(x*.0x10000.0)))letto_floatt=Int64.to_float(Unsigned.UInt32.to_int64t)/.0x10000.letppft=Fmt.pff"%g"(to_floatt)