/* ---------------------------------------------------------------------------------------------------*/ /* 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_quiet_unordered_001, bid128_quiet_unordered, "-0" , "-0" , false, 0x00); dec_test!(bid128_quiet_unordered_002, bid128_quiet_unordered, "-0" , 0 , false, 0x00); dec_test!(bid128_quiet_unordered_003, bid128_quiet_unordered, 0x00000000000000000000000000000000u128, 0x00000000000000000000000000000001u128, false, 0x00); dec_test!(bid128_quiet_unordered_004, bid128_quiet_unordered, 0x00000000000000000000000000000000u128, 0x80000000000000000000000000000001u128, false, 0x00); dec_test!(bid128_quiet_unordered_005, bid128_quiet_unordered, 0x00000000000000000000000000000001u128, 0x00000000000000000000000000000000u128, false, 0x00); dec_test!(bid128_quiet_unordered_006, bid128_quiet_unordered, 0x00000000000000000000000000000001u128, 0x78000000000000000000000000000002u128, false, 0x00); dec_test!(bid128_quiet_unordered_007, bid128_quiet_unordered, 0x00000000000000000000000000000001u128, 0x80000000000000000000000000000000u128, false, 0x00); dec_test!(bid128_quiet_unordered_008, bid128_quiet_unordered, 0x00000000000000000000000000000001u128, 0xf8000000000000000000000000000002u128, false, 0x00); dec_test!(bid128_quiet_unordered_009, bid128_quiet_unordered, 0x0001ed09bead87c0378d8e62ffffffffu128, 0x0001ed09bead87c0378d8e62ffffffffu128, false, 0x00); dec_test!(bid128_quiet_unordered_010, bid128_quiet_unordered, 0x0001ed09bead87c0378d8e62ffffffffu128, 0x0001ed09bead87c0378d8e64ffffffffu128, false, 0x00); dec_test!(bid128_quiet_unordered_011, bid128_quiet_unordered, 0x0001ed09bead87c0378d8e62ffffffffu128, 0x7c003fffffffffff38c15b08ffffffffu128, true , 0x00); dec_test!(bid128_quiet_unordered_012, bid128_quiet_unordered, 0x0001ed09bead87c0378d8e62ffffffffu128, 0x7c003fffffffffff38c15b0affffffffu128, true , 0x00); dec_test!(bid128_quiet_unordered_013, bid128_quiet_unordered, 0x0001ed09bead87c0378d8e64ffffffffu128, 0x0001ed09bead87c0378d8e62ffffffffu128, false, 0x00); dec_test!(bid128_quiet_unordered_014, bid128_quiet_unordered, 0x0001ed09bead87c0378d8e64ffffffffu128, 0x0001ed09bead87c0378d8e64ffffffffu128, false, 0x00); dec_test!(bid128_quiet_unordered_015, bid128_quiet_unordered, 0x0001ed09bead87c0378d8e64ffffffffu128, 0x7c003fffffffffff38c15b08ffffffffu128, true , 0x00); dec_test!(bid128_quiet_unordered_016, bid128_quiet_unordered, 0x0001ed09bead87c0378d8e64ffffffffu128, 0x7c003fffffffffff38c15b0affffffffu128, true , 0x00); dec_test!(bid128_quiet_unordered_017, bid128_quiet_unordered, 0x0a5aaeb7a9cc4e3c588bca5671a5648du128, 0x53d78f3a39294de750ece259227f335fu128, false, 0x00); dec_test!(bid128_quiet_unordered_018, bid128_quiet_unordered, 0 , "Infinity" , false, 0x00); dec_test!(bid128_quiet_unordered_019, bid128_quiet_unordered, "-0" , "QNaN" , true , 0x00); dec_test!(bid128_quiet_unordered_020, bid128_quiet_unordered, 0 , "QNaN" , true , 0x00); dec_test!(bid128_quiet_unordered_021, bid128_quiet_unordered, "-0" , "SNaN" , true , 0x01); dec_test!(bid128_quiet_unordered_022, bid128_quiet_unordered, 0 , "SNaN" , true , 0x01); dec_test!(bid128_quiet_unordered_023, bid128_quiet_unordered, 0x17fb2d5c00bda1c1ba1628023d90a5a3u128, 0x0202040148002002582c045afb4c1060u128, false, 0x00); dec_test!(bid128_quiet_unordered_024, bid128_quiet_unordered, 0x303e0000000000000000000000000002u128, 0x303e0000000000000000000000000001u128, false, 0x00); dec_test!(bid128_quiet_unordered_025, bid128_quiet_unordered, 0x303e0000000000000000000000000002u128, 0x303e0000000000000000000000000003u128, false, 0x00); dec_test!(bid128_quiet_unordered_026, bid128_quiet_unordered, 0x303e0000000000000000000000000002u128, 0x30820000000000000000000000000001u128, false, 0x00); dec_test!(bid128_quiet_unordered_027, bid128_quiet_unordered, 0x303e0000000000000000000000000002u128, 0xb0820000000000000000000000000001u128, false, 0x00); dec_test!(bid128_quiet_unordered_028, bid128_quiet_unordered, 0x303e0000000000020000000000000000u128, 0x303e0000000000010000000000000000u128, false, 0x00); dec_test!(bid128_quiet_unordered_029, bid128_quiet_unordered, 0x303e0000000000020000000000000000u128, 0x303e0000000000030000000000000000u128, false, 0x00); dec_test!(bid128_quiet_unordered_030, bid128_quiet_unordered, 0x30400000001faa9fc5dcff096007ffffu128, 0x306600000000000000000000003a6a15u128, false, 0x00); dec_test!(bid128_quiet_unordered_031, bid128_quiet_unordered, 0x30400000001faa9fc5dcff0960080000u128, 0x306600000000000000000000003a6a15u128, false, 0x00); dec_test!(bid128_quiet_unordered_032, bid128_quiet_unordered, 0x30400000001faa9fc5dcff0960080001u128, 0x306600000000000000000000003a6a15u128, false, 0x00); dec_test!(bid128_quiet_unordered_033, bid128_quiet_unordered, 0x3040000000fd54fe2ee7f84b003fffffu128, 0x306800000000000000000000002ebb44u128, false, 0x00); dec_test!(bid128_quiet_unordered_034, bid128_quiet_unordered, 0x3040000000fd54fe2ee7f84b00400000u128, 0x306800000000000000000000002ebb44u128, false, 0x00); dec_test!(bid128_quiet_unordered_035, bid128_quiet_unordered, 0x3040000000fd54fe2ee7f84b00400001u128, 0x306800000000000000000000002ebb44u128, false, 0x00); dec_test!(bid128_quiet_unordered_036, bid128_quiet_unordered, 0x3040a6274bbdd0fadd61999e07ac0251u128, 0x3082a6274bbdd0fadd61999e07ac0250u128, false, 0x00); dec_test!(bid128_quiet_unordered_037, bid128_quiet_unordered, 0x3040c612062576589dd46a73a100695eu128, 0x3074c612062576589dd46a73a100695du128, false, 0x00); dec_test!(bid128_quiet_unordered_038, bid128_quiet_unordered, 0x3040c612062576589dda322d47eb47ffu128, 0x3074c612062576589dda322d47eb47feu128, false, 0x00); dec_test!(bid128_quiet_unordered_039, bid128_quiet_unordered, 0x3041622d6fbc91e01277c0caded5b8a3u128, 0x3067622d6fbc91e01277c0caded5b8a2u128, false, 0x00); dec_test!(bid128_quiet_unordered_040, bid128_quiet_unordered, 0x3041622d6fbc91e0127820b72d18cacfu128, 0x3067622d6fbc91e0127820b72d18caceu128, false, 0x00); dec_test!(bid128_quiet_unordered_041, bid128_quiet_unordered, 0x30417361cb863de627fa3c5af3bb4c09u128, 0x30737361cb863de627fa3c5af3bb4c08u128, false, 0x00); dec_test!(bid128_quiet_unordered_042, bid128_quiet_unordered, 0x3047ec3daf9417fe642eaec0d36a73d5u128, 0x307fec3c64797fe80000000000000000u128, false, 0x00); dec_test!(bid128_quiet_unordered_043, bid128_quiet_unordered, 0x3047ec3daf9417fe642eaec0d36a73d7u128, 0x307fec3c64797fe80000000000000000u128, false, 0x00); dec_test!(bid128_quiet_unordered_044, bid128_quiet_unordered, 0x3047ec3daf9417fe642eaec0d36a73d7u128, 0x307fec4450b72ff30000000000000000u128, false, 0x00); dec_test!(bid128_quiet_unordered_045, bid128_quiet_unordered, 0x306600000000000000000000003a6a15u128, 0x30400000001faa9fc5dcff096007ffffu128, false, 0x00); dec_test!(bid128_quiet_unordered_046, bid128_quiet_unordered, 0x306600000000000000000000003a6a15u128, 0x30400000001faa9fc5dcff0960080000u128, false, 0x00); dec_test!(bid128_quiet_unordered_047, bid128_quiet_unordered, 0x306600000000000000000000003a6a15u128, 0x30400000001faa9fc5dcff0960080001u128, false, 0x00); dec_test!(bid128_quiet_unordered_048, bid128_quiet_unordered, 0x3067622d6fbc91e01277c0caded5b8a2u128, 0x3041622d6fbc91e01277c0caded5b8a3u128, false, 0x00); dec_test!(bid128_quiet_unordered_049, bid128_quiet_unordered, 0x3067622d6fbc91e0127820b72d18caceu128, 0x3041622d6fbc91e0127820b72d18cacfu128, false, 0x00); dec_test!(bid128_quiet_unordered_050, bid128_quiet_unordered, 0x306800000000000000000000002ebb44u128, 0x3040000000fd54fe2ee7f84b003fffffu128, false, 0x00); dec_test!(bid128_quiet_unordered_051, bid128_quiet_unordered, 0x306800000000000000000000002ebb44u128, 0x3040000000fd54fe2ee7f84b00400000u128, false, 0x00); dec_test!(bid128_quiet_unordered_052, bid128_quiet_unordered, 0x306800000000000000000000002ebb44u128, 0x3040000000fd54fe2ee7f84b00400001u128, false, 0x00); dec_test!(bid128_quiet_unordered_053, bid128_quiet_unordered, 0x30737361cb863de627fa3c5af3bb4c08u128, 0x30417361cb863de627fa3c5af3bb4c09u128, false, 0x00); dec_test!(bid128_quiet_unordered_054, bid128_quiet_unordered, 0x3074c612062576589dd46a73a100695du128, 0x3040c612062576589dd46a73a100695eu128, false, 0x00); dec_test!(bid128_quiet_unordered_055, bid128_quiet_unordered, 0x3074c612062576589dda322d47eb47feu128, 0x3040c612062576589dda322d47eb47ffu128, false, 0x00); dec_test!(bid128_quiet_unordered_056, bid128_quiet_unordered, 0x307fec3c64797fe80000000000000000u128, 0x3047ec3daf9417fe642eaec0d36a73d7u128, false, 0x00); dec_test!(bid128_quiet_unordered_057, bid128_quiet_unordered, 0x307fec4450b72ff30000000000000000u128, 0x3047ec3daf9417fe642eaec0d36a73d7u128, false, 0x00); dec_test!(bid128_quiet_unordered_058, bid128_quiet_unordered, 0x30820000000000000000000000000001u128, 0x303e0000000000000000000000000002u128, false, 0x00); dec_test!(bid128_quiet_unordered_059, bid128_quiet_unordered, 0x30820000000000000000000000000001u128, 0xb03e0000000000000000000000000002u128, false, 0x00); dec_test!(bid128_quiet_unordered_060, bid128_quiet_unordered, 0x3082a6274bbdd0fadd61999e07ac0250u128, 0x3040a6274bbdd0fadd61999e07ac0251u128, false, 0x00); dec_test!(bid128_quiet_unordered_061, bid128_quiet_unordered, 0x46d9e5aa84c7c4da13544e43faecd2d1u128, 0xfe00167ba5fdb30e9234fa1a0885b516u128, true , 0x01); dec_test!(bid128_quiet_unordered_062, bid128_quiet_unordered, 0x57e583d288e39d1c1efa1e222dd44939u128, 0xfe00259e50b14598cb03813e559c7ca2u128, true , 0x01); dec_test!(bid128_quiet_unordered_063, bid128_quiet_unordered, 0x5f3c0000000000000000000000000000u128, 0x7e001ba79988eb5493f85d1d779a1c70u128, true , 0x01); dec_test!(bid128_quiet_unordered_064, bid128_quiet_unordered, 0x78000000000000000000000000000001u128, 0x00000000000000000000000000000002u128, false, 0x00); dec_test!(bid128_quiet_unordered_065, bid128_quiet_unordered, 0x78000000000000000000000000000001u128, 0x78000000000000000000000000000002u128, false, 0x00); dec_test!(bid128_quiet_unordered_066, bid128_quiet_unordered, 0x78000000000000000000000000000001u128, 0x80000000000000000000000000000002u128, false, 0x00); dec_test!(bid128_quiet_unordered_067, bid128_quiet_unordered, 0x78000000000000000000000000000001u128, 0xf8000000000000000000000000000002u128, false, 0x00); dec_test!(bid128_quiet_unordered_068, bid128_quiet_unordered, 0x7c003fffffffffff38c15b08ffffffffu128, 0x0001ed09bead87c0378d8e62ffffffffu128, true , 0x00); dec_test!(bid128_quiet_unordered_069, bid128_quiet_unordered, 0x7c003fffffffffff38c15b08ffffffffu128, 0x0001ed09bead87c0378d8e64ffffffffu128, true , 0x00); dec_test!(bid128_quiet_unordered_070, bid128_quiet_unordered, 0x7c003fffffffffff38c15b08ffffffffu128, 0x7c003fffffffffff38c15b08ffffffffu128, true , 0x00); dec_test!(bid128_quiet_unordered_071, bid128_quiet_unordered, 0x7c003fffffffffff38c15b08ffffffffu128, 0x7c003fffffffffff38c15b0affffffffu128, true , 0x00); dec_test!(bid128_quiet_unordered_072, bid128_quiet_unordered, 0x7c003fffffffffff38c15b0affffffffu128, 0x0001ed09bead87c0378d8e62ffffffffu128, true , 0x00); dec_test!(bid128_quiet_unordered_073, bid128_quiet_unordered, 0x7c003fffffffffff38c15b0affffffffu128, 0x0001ed09bead87c0378d8e64ffffffffu128, true , 0x00); dec_test!(bid128_quiet_unordered_074, bid128_quiet_unordered, 0x7c003fffffffffff38c15b0affffffffu128, 0x7c003fffffffffff38c15b08ffffffffu128, true , 0x00); dec_test!(bid128_quiet_unordered_075, bid128_quiet_unordered, 0x7c003fffffffffff38c15b0affffffffu128, 0x7c003fffffffffff38c15b0affffffffu128, true , 0x00); dec_test!(bid128_quiet_unordered_076, bid128_quiet_unordered, 0x7e000000000000000000000000000000u128, 0x1bb1b163288518213cc941152397d90cu128, true , 0x01); dec_test!(bid128_quiet_unordered_077, bid128_quiet_unordered, 0x7e000000000000000000000000000000u128, 0xd015270d4276708136e52c0b7ae9c56au128, true , 0x01); dec_test!(bid128_quiet_unordered_078, bid128_quiet_unordered, 0x80000000000000000000000000000000u128, 0x00000000000000000000000000000001u128, false, 0x00); dec_test!(bid128_quiet_unordered_079, bid128_quiet_unordered, 0x80000000000000000000000000000000u128, 0x80000000000000000000000000000001u128, false, 0x00); dec_test!(bid128_quiet_unordered_080, bid128_quiet_unordered, 0x80000000000000000000000000000001u128, 0x00000000000000000000000000000000u128, false, 0x00); dec_test!(bid128_quiet_unordered_081, bid128_quiet_unordered, 0x80000000000000000000000000000001u128, 0x78000000000000000000000000000002u128, false, 0x00); dec_test!(bid128_quiet_unordered_082, bid128_quiet_unordered, 0x80000000000000000000000000000001u128, 0x80000000000000000000000000000000u128, false, 0x00); dec_test!(bid128_quiet_unordered_083, bid128_quiet_unordered, 0x80000000000000000000000000000001u128, 0xf8000000000000000000000000000002u128, false, 0x00); dec_test!(bid128_quiet_unordered_084, bid128_quiet_unordered, 0x8dac3c6bdfb9e47f8b1fb68f08527f17u128, 0xfe000000000000000000000000000000u128, true , 0x01); dec_test!(bid128_quiet_unordered_085, bid128_quiet_unordered, 0x939c116f756823715404e56fef39d519u128, 0x7e0017cc685319267f2e4eb493bb2d20u128, true , 0x01); dec_test!(bid128_quiet_unordered_086, bid128_quiet_unordered, 0xb03e0000000000000000000000000002u128, 0x30820000000000000000000000000001u128, false, 0x00); dec_test!(bid128_quiet_unordered_087, bid128_quiet_unordered, 0xb03e0000000000000000000000000002u128, 0xb03e0000000000000000000000000001u128, false, 0x00); dec_test!(bid128_quiet_unordered_088, bid128_quiet_unordered, 0xb03e0000000000000000000000000002u128, 0xb03e0000000000000000000000000003u128, false, 0x00); dec_test!(bid128_quiet_unordered_089, bid128_quiet_unordered, 0xb03e0000000000000000000000000002u128, 0xb0820000000000000000000000000001u128, false, 0x00); dec_test!(bid128_quiet_unordered_090, bid128_quiet_unordered, 0xb03e0000000000020000000000000000u128, 0xb03e0000000000010000000000000000u128, false, 0x00); dec_test!(bid128_quiet_unordered_091, bid128_quiet_unordered, 0xb03e0000000000020000000000000000u128, 0xb03e0000000000030000000000000000u128, false, 0x00); dec_test!(bid128_quiet_unordered_092, bid128_quiet_unordered, 0xb047ec3daf9417fe642eaec0d36a73d7u128, 0xb07fec3c64797fe80000000000000000u128, false, 0x00); dec_test!(bid128_quiet_unordered_093, bid128_quiet_unordered, 0xb047ec3daf9417fe642eaec0d36a73d7u128, 0xb07fec4450b72ff30000000000000000u128, false, 0x00); dec_test!(bid128_quiet_unordered_094, bid128_quiet_unordered, 0xb07fec3c64797fe80000000000000000u128, 0xb047ec3daf9417fe642eaec0d36a73d7u128, false, 0x00); dec_test!(bid128_quiet_unordered_095, bid128_quiet_unordered, 0xb07fec4450b72ff30000000000000000u128, 0xb047ec3daf9417fe642eaec0d36a73d7u128, false, 0x00); dec_test!(bid128_quiet_unordered_096, bid128_quiet_unordered, 0xb0820000000000000000000000000001u128, 0x303e0000000000000000000000000002u128, false, 0x00); dec_test!(bid128_quiet_unordered_097, bid128_quiet_unordered, 0xb0820000000000000000000000000001u128, 0xb03e0000000000000000000000000002u128, false, 0x00); dec_test!(bid128_quiet_unordered_098, bid128_quiet_unordered, 0xf8000000000000000000000000000001u128, 0x00000000000000000000000000000002u128, false, 0x00); dec_test!(bid128_quiet_unordered_099, bid128_quiet_unordered, 0xf8000000000000000000000000000001u128, 0x78000000000000000000000000000002u128, false, 0x00); dec_test!(bid128_quiet_unordered_100, bid128_quiet_unordered, 0xf8000000000000000000000000000001u128, 0x80000000000000000000000000000002u128, false, 0x00); dec_test!(bid128_quiet_unordered_101, bid128_quiet_unordered, 0xf8000000000000000000000000000001u128, 0xf8000000000000000000000000000002u128, false, 0x00); dec_test!(bid128_quiet_unordered_102, bid128_quiet_unordered, 0xfe000000000000000000000000000000u128, 0x2df00000000000000000000000000000u128, true , 0x01); dec_test!(bid128_quiet_unordered_103, bid128_quiet_unordered, 0xfe0023ebcf38551f5079b1c43b5821bfu128, 0x23a13c7e109dfdbfe067514c3d0798f1u128, true , 0x01); dec_test!(bid128_quiet_unordered_104, bid128_quiet_unordered, 0xfeee7dbfffff5ff7e6cefdadbef9898bu128, 0x7ad77fffbbea7ffd1004000058645220u128, true , 0x01); dec_test!(bid128_quiet_unordered_105, bid128_quiet_unordered, "-Infinity" , 0 , false, 0x00); dec_test!(bid128_quiet_unordered_106, bid128_quiet_unordered, "Infinity" , 0 , false, 0x00); dec_test!(bid128_quiet_unordered_107, bid128_quiet_unordered, "Infinity" , "SNaN" , true , 0x01); dec_test!(bid128_quiet_unordered_108, bid128_quiet_unordered, "QNaN" , "-0" , true , 0x00); dec_test!(bid128_quiet_unordered_109, bid128_quiet_unordered, "QNaN" , 0 , true , 0x00); dec_test!(bid128_quiet_unordered_110, bid128_quiet_unordered, "QNaN" , "SNaN" , true , 0x01); dec_test!(bid128_quiet_unordered_111, bid128_quiet_unordered, "SNaN" , 0 , true , 0x01); dec_test!(bid128_quiet_unordered_112, bid128_quiet_unordered, "SNaN" , "QNaN" , true , 0x01); dec_test!(bid128_quiet_unordered_113, bid128_quiet_unordered, "SNaN" , "SNaN" , true , 0x01);