MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / bitcast_int_from_float_32

Function bitcast_int_from_float_32

pulley/tests/all/interp.rs:685–710  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

683
684#[test]
685fn bitcast_int_from_float_32() {
686 for val in [
687 0.0,
688 1.0,
689 9.87654321,
690 f32::MAX,
691 f32::MIN,
692 f32::NAN,
693 f32::INFINITY,
694 f32::NEG_INFINITY,
695 f32::EPSILON,
696 f32::MIN_POSITIVE,
697 ] {
698 unsafe {
699 assert_one(
700 [(f(0), val)],
701 BitcastIntFromFloat32 {
702 dst: x(0),
703 src: f(0),
704 },
705 x(0),
706 val.to_bits() as u64,
707 );
708 }
709 }
710}
711
712#[test]
713fn bitcast_int_from_float_64() {

Callers

nothing calls this directly

Calls 4

assert_oneFunction · 0.85
fFunction · 0.70
xFunction · 0.70
to_bitsMethod · 0.45

Tested by

no test coverage detected