/* ---------------------------------------------------------------------------------------------------*/ /* Port of the Intel Decimal Floating-Point Math Library decimal128 type to Rust. */ /* decmathlib-rs - Copyright (C) 2023-2024 Carlos Guzmán Álvarez */ /* -------------------------------------------------------------------------------------------------- */ /* Licensed under the MIT license. See LICENSE file in the project root for full license information. */ /* -------------------------------------------------------------------------------------------------- */ /* Intel® Decimal Floating-Point Math Library - Copyright (c) 2018, Intel Corp. */ /* -------------------------------------------------------------------------------------------------- */ mod common; dec_test!(bid128_logb_001, bid128_logb, 0x00000000000000000000000000000000u128, 0xf8000000000000000000000000000000u128, 0x04); // ulp=0.0000000000 dec_test!(bid128_logb_002, bid128_logb, 0x00000000000000000000000000000001u128, 0xB0400000000000000000000000001820u128, 0x00); // ulp=0.0000000000 -- MinDen dec_test!(bid128_logb_003, bid128_logb, 0x0001ed09bead87c0378d8e64ffffffffu128, 0xf8000000000000000000000000000000u128, 0x04); dec_test!(bid128_logb_004, bid128_logb, 0x00420000000000000000000000000001u128, 0xB04000000000000000000000000017FFu128, 0x00); // ulp=0.0000000000 -- MinNorm dec_test!(bid128_logb_005, bid128_logb, 0x2FFDED09BEAD87C0378D8E63FFFFFFFFu128, 0xB0400000000000000000000000000001u128, 0x00); // ulp=0.0000000000 -- 1-// ulp dec_test!(bid128_logb_006, bid128_logb, 0x5FFFED09BEAD87C0378D8E63FFFFFFFFu128, 0x30400000000000000000000000001800u128, 0x00); // ulp=0.0000000000 -- Max dec_test!(bid128_logb_007, bid128_logb, 0x6003b75d7734cd9e1234567890123456u128, 0xf8000000000000000000000000000000u128, 0x04); dec_test!(bid128_logb_008, bid128_logb, 0x69dbb75d7734cd9e1234567890123456u128, 0xf8000000000000000000000000000000u128, 0x04); dec_test!(bid128_logb_009, bid128_logb, 0x78000000000000000000000000000000u128, 0x78000000000000000000000000000000u128, 0x00); dec_test!(bid128_logb_010, bid128_logb, 0x78000001000000000000000000000000u128, 0x78000000000000000000000000000000u128, 0x00); dec_test!(bid128_logb_011, bid128_logb, 0x7c000000000000000000000000000000u128, 0x7c000000000000000000000000000000u128, 0x00); dec_test!(bid128_logb_012, bid128_logb, 0x7c000001000000000000000000000000u128, 0x7c000001000000000000000000000000u128, 0x00); dec_test!(bid128_logb_013, bid128_logb, 0x7cff3fffffffefffffffffffffffffffu128, 0x7c000000000000000000000000000000u128, 0x00); dec_test!(bid128_logb_014, bid128_logb, 0x7e000000000000000000000000000000u128, 0x7c000000000000000000000000000000u128, 0x01); dec_test!(bid128_logb_015, bid128_logb, 0x7e003fffffffefffffffffffffffffffu128, 0x7c000000000000000000000000000000u128, 0x01); dec_test!(bid128_logb_016, bid128_logb, 0x7ef00000000000000000000000000001u128, 0x7c000000000000000000000000000001u128, 0x01); dec_test!(bid128_logb_017, bid128_logb, 0x80000000000000000000000000000001u128, 0xB0400000000000000000000000001820u128, 0x00); // ulp=0.0000000000 -- -MinDen dec_test!(bid128_logb_018, bid128_logb, 0x80420000000000000000000000000001u128, 0xB04000000000000000000000000017FFu128, 0x00); // ulp=0.0000000000 -- -MinNorm dec_test!(bid128_logb_019, bid128_logb, 0xAFFDED09BEAD87C0378D8E63FFFFFFFFu128, 0xB0400000000000000000000000000001u128, 0x00); // ulp=0.0000000000 -- -(1-// ulp) dec_test!(bid128_logb_020, bid128_logb, 0xDFFFED09BEAD87C0378D8E63FFFFFFFFu128, 0x30400000000000000000000000001800u128, 0x00); // ulp=0.0000000000 -- -Max dec_test!(bid128_logb_021, bid128_logb, 0xe003b75d7734cd9e1234567890123456u128, 0xf8000000000000000000000000000000u128, 0x04); dec_test!(bid128_logb_022, bid128_logb, 0xe9dbb75d7734cd9e1234567890123456u128, 0xf8000000000000000000000000000000u128, 0x04); dec_test!(bid128_logb_023, bid128_logb, 0xf8000000000000000000000000000000u128, 0x78000000000000000000000000000000u128, 0x00); dec_test!(bid128_logb_024, bid128_logb, 0xf8000001000000000000000000000000u128, 0x78000000000000000000000000000000u128, 0x00); dec_test!(bid128_logb_025, bid128_logb, 0xfc000000000000000000000000000000u128, 0xfc000000000000000000000000000000u128, 0x00); dec_test!(bid128_logb_026, bid128_logb, 0xfc000001000000000000000000000000u128, 0xfc000001000000000000000000000000u128, 0x00); dec_test!(bid128_logb_027, bid128_logb, 0xfe000000000000000000000000000000u128, 0xfc000000000000000000000000000000u128, 0x01); dec_test!(bid128_logb_028, bid128_logb, 0xfef00000000000000000000000000001u128, 0xfc000000000000000000000000000001u128, 0x01); // dec_test!(bid128_logb_029, bid128_logb, 1, 0x00000000000000000000000000000001u128, 0xB0400000000000000000000000001820u128, 0x00); // ulp=0.0000000000 -- MinDen // dec_test!(bid128_logb_030, bid128_logb, 1, 0x00420000000000000000000000000001u128, 0xB04000000000000000000000000017FFu128, 0x00); // ulp=0.0000000000 -- MinNorm // dec_test!(bid128_logb_031, bid128_logb, 1, 0x2FFDED09BEAD87C0378D8E63FFFFFFFFu128, 0xB0400000000000000000000000000001u128, 0x00); // ulp=0.0000000000 -- 1-// ulp // dec_test!(bid128_logb_032, bid128_logb, 1, 0x5FFFED09BEAD87C0378D8E63FFFFFFFFu128, 0x30400000000000000000000000001800u128, 0x00); // ulp=0.0000000000 -- Max // dec_test!(bid128_logb_033, bid128_logb, 1, 0x80000000000000000000000000000001u128, 0xB0400000000000000000000000001820u128, 0x00); // ulp=0.0000000000 -- -MinDen // dec_test!(bid128_logb_034, bid128_logb, 1, 0x80420000000000000000000000000001u128, 0xB04000000000000000000000000017FFu128, 0x00); // ulp=0.0000000000 -- -MinNorm // dec_test!(bid128_logb_035, bid128_logb, 1, 0xAFFDED09BEAD87C0378D8E63FFFFFFFFu128, 0xB0400000000000000000000000000001u128, 0x00); // ulp=0.0000000000 -- -(1-// ulp) // dec_test!(bid128_logb_036, bid128_logb, 1, 0xDFFFED09BEAD87C0378D8E63FFFFFFFFu128, 0x30400000000000000000000000001800u128, 0x00); // ulp=0.0000000000 -- -Max // dec_test!(bid128_logb_037, bid128_logb, 2, 0x00000000000000000000000000000001u128, 0xB0400000000000000000000000001820u128, 0x00); // ulp=0.0000000000 -- MinDen // dec_test!(bid128_logb_038, bid128_logb, 2, 0x00420000000000000000000000000001u128, 0xB04000000000000000000000000017FFu128, 0x00); // ulp=0.0000000000 -- MinNorm // dec_test!(bid128_logb_039, bid128_logb, 2, 0x2FFDED09BEAD87C0378D8E63FFFFFFFFu128, 0xB0400000000000000000000000000001u128, 0x00); // ulp=0.0000000000 -- 1-// ulp // dec_test!(bid128_logb_040, bid128_logb, 2, 0x5FFFED09BEAD87C0378D8E63FFFFFFFFu128, 0x30400000000000000000000000001800u128, 0x00); // ulp=0.0000000000 -- Max // dec_test!(bid128_logb_041, bid128_logb, 2, 0x80000000000000000000000000000001u128, 0xB0400000000000000000000000001820u128, 0x00); // ulp=0.0000000000 -- -MinDen // dec_test!(bid128_logb_042, bid128_logb, 2, 0x80420000000000000000000000000001u128, 0xB04000000000000000000000000017FFu128, 0x00); // ulp=0.0000000000 -- -MinNorm // dec_test!(bid128_logb_043, bid128_logb, 2, 0xAFFDED09BEAD87C0378D8E63FFFFFFFFu128, 0xB0400000000000000000000000000001u128, 0x00); // ulp=0.0000000000 -- -(1-// ulp) // dec_test!(bid128_logb_044, bid128_logb, 2, 0xDFFFED09BEAD87C0378D8E63FFFFFFFFu128, 0x30400000000000000000000000001800u128, 0x00); // ulp=0.0000000000 -- -Max // dec_test!(bid128_logb_045, bid128_logb, 3, 0x00000000000000000000000000000001u128, 0xB0400000000000000000000000001820u128, 0x00); // ulp=0.0000000000 -- MinDen // dec_test!(bid128_logb_046, bid128_logb, 3, 0x00420000000000000000000000000001u128, 0xB04000000000000000000000000017FFu128, 0x00); // ulp=0.0000000000 -- MinNorm // dec_test!(bid128_logb_047, bid128_logb, 3, 0x2FFDED09BEAD87C0378D8E63FFFFFFFFu128, 0xB0400000000000000000000000000001u128, 0x00); // ulp=0.0000000000 -- 1-// ulp // dec_test!(bid128_logb_048, bid128_logb, 3, 0x5FFFED09BEAD87C0378D8E63FFFFFFFFu128, 0x30400000000000000000000000001800u128, 0x00); // ulp=0.0000000000 -- Max // dec_test!(bid128_logb_049, bid128_logb, 3, 0x80000000000000000000000000000001u128, 0xB0400000000000000000000000001820u128, 0x00); // ulp=0.0000000000 -- -MinDen // dec_test!(bid128_logb_050, bid128_logb, 3, 0x80420000000000000000000000000001u128, 0xB04000000000000000000000000017FFu128, 0x00); // ulp=0.0000000000 -- -MinNorm // dec_test!(bid128_logb_051, bid128_logb, 3, 0xAFFDED09BEAD87C0378D8E63FFFFFFFFu128, 0xB0400000000000000000000000000001u128, 0x00); // ulp=0.0000000000 -- -(1-// ulp) // dec_test!(bid128_logb_052, bid128_logb, 3, 0xDFFFED09BEAD87C0378D8E63FFFFFFFFu128, 0x30400000000000000000000000001800u128, 0x00); // ulp=0.0000000000 -- -Max