From 9b3dde66bd24efe5eeb6bd965cc66147779ad31e Mon Sep 17 00:00:00 2001 From: Quaternions Date: Tue, 1 Oct 2024 15:00:06 -0700 Subject: [PATCH] change to float tests --- fixed_wide/src/tests.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fixed_wide/src/tests.rs b/fixed_wide/src/tests.rs index 22002a2..34afcc8 100644 --- a/fixed_wide/src/tests.rs +++ b/fixed_wide/src/tests.rs @@ -17,9 +17,9 @@ fn to_f32(){ let a=I256F256::from(0); let f:f32=(-a).into(); assert_eq!(f,0f32); - let a=I256F256::from(237946589723468975i64)<<32; + let a=I256F256::from(237946589723468975i64)<<16; let f:f32=a.into(); - assert_eq!(f,237946589723468975f32*2.0f32.powi(32)); + assert_eq!(f,237946589723468975f32*2.0f32.powi(16)); } #[test] @@ -32,9 +32,9 @@ fn to_f64(){ let a=I256F256::from(0); let f:f64=(-a).into(); assert_eq!(f,0f64); - let a=I256F256::from(237946589723468975i64)<<32; + let a=I256F256::from(237946589723468975i64)<<16; let f:f64=a.into(); - assert_eq!(f,237946589723468975f64*2.0f64.powi(32)); + assert_eq!(f,237946589723468975f64*2.0f64.powi(16)); } #[test]