1pub type D38<const SCALE: u32> = crate::D<crate::int::types::Int<2>, SCALE>;
61
62impl<const SCALE: u32> Default for crate::D<crate::int::types::Int<2>, SCALE> {
75 #[inline]
76 fn default() -> Self {
77 Self::ZERO
78 }
79}
80
81pub type D38s0 = D38<0>;
102
103pub type D38s1 = D38<1>;
110
111pub type D38s2 = D38<2>;
117
118pub type D38s3 = D38<3>;
125
126pub type D38s4 = D38<4>;
132
133pub type D38s5 = D38<5>;
139
140pub type D38s6 = D38<6>;
147
148pub type D38s7 = D38<7>;
154
155pub type D38s8 = D38<8>;
161
162pub type D38s9 = D38<9>;
169
170pub type D38s10 = D38<10>;
176
177pub type D38s11 = D38<11>;
183
184pub type D38s12 = D38<12>;
197
198pub type D38s13 = D38<13>;
204
205pub type D38s14 = D38<14>;
211
212pub type D38s15 = D38<15>;
218
219pub type D38s16 = D38<16>;
225
226pub type D38s17 = D38<17>;
232
233pub type D38s18 = D38<18>;
240
241pub type D38s19 = D38<19>;
247
248pub type D38s20 = D38<20>;
254
255pub type D38s21 = D38<21>;
261
262pub type D38s22 = D38<22>;
268
269pub type D38s23 = D38<23>;
275
276pub type D38s24 = D38<24>;
282
283pub type D38s25 = D38<25>;
289
290pub type D38s26 = D38<26>;
296
297pub type D38s27 = D38<27>;
303
304pub type D38s28 = D38<28>;
310
311pub type D38s29 = D38<29>;
317
318pub type D38s30 = D38<30>;
324
325pub type D38s31 = D38<31>;
331
332pub type D38s32 = D38<32>;
338
339pub type D38s33 = D38<33>;
345
346pub type D38s34 = D38<34>;
352
353pub type D38s35 = D38<35>;
363
364pub type D38s36 = D38<36>;
375
376pub type D38s37 = D38<37>;
389
390pub use crate::support::error::ParseError;
393
394crate::macros::basics::decl_decimal_basics!(wide D38, crate::int::types::Int<2>, 37);
398crate::macros::display::decl_decimal_display!(wide D38, crate::int::types::Uint<2>);
399crate::macros::from_str::decl_decimal_from_str!(wide D38, crate::int::types::Int<2>);
404crate::macros::storage_formatters::decl_decimal_storage_formatters!(D38);
405crate::macros::bitwise::decl_decimal_bitwise!(wide D38, crate::int::types::Int<2>);
409crate::macros::int_methods::decl_decimal_int_methods!(wide D38, crate::int::types::Int<2>);
412crate::macros::num_traits::decl_decimal_num_traits_conversions!(wide D38, crate::int::types::Int<2>);
414crate::macros::float_bridge::decl_decimal_float_bridge!(wide D38, crate::int::types::Int<2>);
415crate::macros::conversions::decl_try_from_primitive!(wide D38, crate::int::types::Int<2>, i8);
416crate::macros::conversions::decl_try_from_primitive!(wide D38, crate::int::types::Int<2>, i16);
417crate::macros::conversions::decl_try_from_primitive!(wide D38, crate::int::types::Int<2>, i32);
418crate::macros::conversions::decl_try_from_primitive!(wide D38, crate::int::types::Int<2>, i64);
419crate::macros::conversions::decl_try_from_primitive!(wide D38, crate::int::types::Int<2>, u8);
420crate::macros::conversions::decl_try_from_primitive!(wide D38, crate::int::types::Int<2>, u16);
421crate::macros::conversions::decl_try_from_primitive!(wide D38, crate::int::types::Int<2>, u32);
422crate::macros::conversions::decl_try_from_primitive!(wide D38, crate::int::types::Int<2>, u64);
423crate::macros::conversions::decl_try_from_i128!(wide D38, crate::int::types::Int<2>);
424crate::macros::conversions::decl_try_from_u128!(wide D38, crate::int::types::Int<2>);
425crate::macros::conversions::decl_try_from_i128!(wide D18, crate::int::types::Int<1>);
426crate::macros::conversions::decl_try_from_u128!(wide D18, crate::int::types::Int<1>);
427crate::macros::conversions::decl_try_from_i64!(wide D18, crate::int::types::Int<1>);
434crate::macros::conversions::decl_try_from_u64!(wide D18, crate::int::types::Int<1>);
435crate::macros::conversions::decl_try_from_f64!(wide D38, crate::int::types::Int<2>);
436crate::macros::conversions::decl_try_from_f32!(wide D38, crate::int::types::Int<2>);
437crate::macros::conversions::decl_try_from_f64!(wide D18, crate::int::types::Int<1>);
438crate::macros::conversions::decl_try_from_f32!(wide D18, crate::int::types::Int<1>);
439crate::macros::conversions::decl_decimal_int_conversion_methods!(wide D38, crate::int::types::Int<2>);
440crate::macros::sign::decl_decimal_sign_methods!(wide D38, crate::int::types::Int<2>);
445crate::macros::helpers::decl_decimal_helpers!(wide D38);
446crate::macros::rounding_methods::decl_decimal_rounding_methods!(wide D38);
447crate::macros::overflow::decl_decimal_overflow_variants!(wide D38, crate::int::types::Int<2>, crate::int::types::Int<4>);
452crate::macros::arithmetic::decl_decimal_arithmetic!(wide D38, crate::int::types::Int<2>, crate::int::types::Int<4>);
456crate::macros::num_traits::decl_decimal_num_traits_basics!(D38);
461crate::macros::transcendental_trait::decl_decimal_transcendental_impl!(D38);
462
463crate::macros::conversions::decl_decimal_int_conversion_methods!(wide D18, crate::int::types::Int<1>);
490
491impl<const SCALE: u32> crate::D<crate::int::types::Int<2>, SCALE> {
496 #[inline]
507 pub fn narrow(self) -> Result<crate::D<crate::int::types::Int<1>, SCALE>, crate::support::error::ConvertError> {
508 self.try_into()
509 }
510}
511
512pub type D18<const SCALE: u32> = crate::D<crate::int::types::Int<1>, SCALE>;
527
528impl<const SCALE: u32> Default for crate::D<crate::int::types::Int<1>, SCALE> {
534 #[inline]
535 fn default() -> Self {
536 Self::ZERO
537 }
538}
539
540crate::macros::basics::decl_decimal_basics!(wide D18, crate::int::types::Int<1>, 17);
541crate::macros::arithmetic::decl_decimal_arithmetic!(wide D18, crate::int::types::Int<1>, crate::int::types::Int<2>);
542crate::macros::conversions::decl_try_from_primitive!(wide D18, crate::int::types::Int<1>, i8);
543crate::macros::conversions::decl_try_from_primitive!(wide D18, crate::int::types::Int<1>, i16);
544crate::macros::conversions::decl_try_from_primitive!(wide D18, crate::int::types::Int<1>, i32);
545crate::macros::conversions::decl_try_from_primitive!(wide D18, crate::int::types::Int<1>, u8);
546crate::macros::conversions::decl_try_from_primitive!(wide D18, crate::int::types::Int<1>, u16);
547crate::macros::conversions::decl_try_from_primitive!(wide D18, crate::int::types::Int<1>, u32);
548crate::macros::display::decl_decimal_display!(wide D18, crate::int::types::Uint<1>);
549crate::macros::overflow::decl_decimal_overflow_variants!(wide D18, crate::int::types::Int<1>, crate::int::types::Int<2>);
550crate::macros::num_traits::decl_decimal_num_traits_basics!(D18);
551crate::macros::sign::decl_decimal_sign_methods!(wide D18, crate::int::types::Int<1>);
552crate::macros::from_str::decl_decimal_from_str!(wide D18, crate::int::types::Int<1>);
556crate::macros::float_bridge::decl_decimal_float_bridge!(wide D18, crate::int::types::Int<1>);
557crate::macros::storage_formatters::decl_decimal_storage_formatters!(D18);
558crate::macros::strict_transcendentals::decl_strict_transcendentals_via_d38!(D18);
559crate::macros::transcendental_trait::decl_decimal_transcendental_impl!(D18);
560crate::macros::fast_transcendentals::decl_fast_transcendentals_via_f64!(D18);
561crate::macros::pow::decl_decimal_pow!(D18);
562crate::macros::rounding_methods::decl_decimal_rounding_methods!(wide D18);
563crate::macros::helpers::decl_decimal_helpers!(wide D18);
564crate::macros::bitwise::decl_decimal_bitwise!(wide D18, crate::int::types::Int<1>);
565crate::macros::int_methods::decl_decimal_int_methods!(wide D18, crate::int::types::Int<1>);
566crate::macros::num_traits::decl_decimal_num_traits_conversions!(wide D18, crate::int::types::Int<1>);
567
568crate::macros::conversions::decl_cross_width_widening!(wide D38, crate::int::types::Int<2>, D18, crate::int::types::Int<1>);
570
571crate::macros::conversions::decl_cross_width_narrowing!(wide D18, crate::int::types::Int<1>, D38, crate::int::types::Int<2>);
573
574impl<const SCALE: u32> crate::D<crate::int::types::Int<1>, SCALE> {
582 #[inline]
592 #[must_use]
593 pub fn widen(self) -> crate::D<crate::int::types::Int<2>, SCALE> {
594 self.into()
595 }
596}
597
598pub type D18s0 = D18<0>;
600pub type D18s1 = D18<1>;
602pub type D18s2 = D18<2>;
604pub type D18s3 = D18<3>;
606pub type D18s4 = D18<4>;
608pub type D18s5 = D18<5>;
610pub type D18s6 = D18<6>;
612pub type D18s7 = D18<7>;
614pub type D18s8 = D18<8>;
616pub type D18s9 = D18<9>;
618pub type D18s10 = D18<10>;
620pub type D18s11 = D18<11>;
622pub type D18s12 = D18<12>;
624pub type D18s13 = D18<13>;
626pub type D18s14 = D18<14>;
628pub type D18s15 = D18<15>;
630pub type D18s16 = D18<16>;
632pub type D18s17 = D18<17>;
637
638#[cfg(any(feature = "d76", feature = "wide"))]
658pub type D76<const SCALE: u32> = crate::D<crate::int::types::Int<4>, SCALE>;
659
660#[cfg(any(feature = "d76", feature = "wide"))]
667impl<const SCALE: u32> Default for crate::D<crate::int::types::Int<4>, SCALE> {
668 #[inline]
669 fn default() -> Self {
670 Self::ZERO
671 }
672}
673
674#[cfg(any(feature = "d76", feature = "wide"))]
675crate::macros::full::decl_decimal_full!(
676 wide D76,
677 crate::int::types::Int<4>,
678 crate::int::types::Uint<4>,
679 crate::int::types::Int<8>,
680 crate::int::types::Int<8>,
681 crate::int::types::Int<16>,
682 crate::int::types::Int<16>,
683 crate::int::types::Int<32>,
684 crate::int::types::Int<16>,
685 wide_trig_d76,
686 75,
687 4,
688 400,
689 512
690);
691#[cfg(any(feature = "d76", feature = "wide"))]
693#[cfg(any(feature = "d76", feature = "wide"))]
694crate::macros::conversions::decl_cross_width_widening!(wide D76, crate::int::types::Int<4>, D18, crate::int::types::Int<1>);
695#[cfg(any(feature = "d76", feature = "wide"))]
696crate::macros::conversions::decl_cross_width_widening!(wide D76, crate::int::types::Int<4>, D38, crate::int::types::Int<2>);
697#[cfg(any(feature = "d76", feature = "wide"))]
699crate::macros::conversions::decl_cross_width_narrowing!(wide D38, crate::int::types::Int<2>, D76, crate::int::types::Int<4>);
700#[cfg(any(feature = "d76", feature = "wide"))]
701crate::macros::conversions::decl_cross_width_narrowing!(wide D18, crate::int::types::Int<1>, D76, crate::int::types::Int<4>);
702#[cfg(any(feature = "d76", feature = "wide"))]
703
704#[cfg(any(feature = "d57", feature = "wide"))]
707impl<const SCALE: u32> crate::D<crate::int::types::Int<2>, SCALE> {
708 #[inline]
720 #[must_use]
721 pub fn widen(self) -> crate::D<crate::int::types::Int<3>, SCALE> {
722 self.into()
723 }
724}
725
726#[cfg(all(
727 any(feature = "d76", feature = "wide"),
728 any(feature = "d57", feature = "wide"),
729))]
730impl<const SCALE: u32> crate::D<crate::int::types::Int<4>, SCALE> {
731 #[inline]
735 pub fn narrow(self) -> Result<crate::D<crate::int::types::Int<3>, SCALE>, crate::support::error::ConvertError> {
736 self.try_into()
737 }
738}
739
740#[cfg(any(feature = "d76", feature = "wide"))]
742pub type D76s0 = D76<0>;
743#[cfg(any(feature = "d76", feature = "wide"))]
745pub type D76s1 = D76<1>;
746#[cfg(any(feature = "d76", feature = "wide"))]
748pub type D76s2 = D76<2>;
749#[cfg(any(feature = "d76", feature = "wide"))]
750pub type D76s3 = D76<3>;
751#[cfg(any(feature = "d76", feature = "wide"))]
752pub type D76s4 = D76<4>;
753#[cfg(any(feature = "d76", feature = "wide"))]
755pub type D76s6 = D76<6>;
756#[cfg(any(feature = "d76", feature = "wide"))]
757pub type D76s9 = D76<9>;
758#[cfg(any(feature = "d76", feature = "wide"))]
760pub type D76s12 = D76<12>;
761#[cfg(any(feature = "d76", feature = "wide"))]
762pub type D76s15 = D76<15>;
763#[cfg(any(feature = "d76", feature = "wide"))]
765pub type D76s18 = D76<18>;
766#[cfg(any(feature = "d76", feature = "wide"))]
767pub type D76s20 = D76<20>;
768#[cfg(any(feature = "d76", feature = "wide"))]
769pub type D76s24 = D76<24>;
770#[cfg(any(feature = "d76", feature = "wide"))]
771pub type D76s28 = D76<28>;
772#[cfg(any(feature = "d76", feature = "wide"))]
773pub type D76s32 = D76<32>;
774#[cfg(any(feature = "d76", feature = "wide"))]
776pub type D76s35 = D76<35>;
777#[cfg(any(feature = "d76", feature = "wide"))]
778pub type D76s38 = D76<38>;
779#[cfg(any(feature = "d76", feature = "wide"))]
780pub type D76s42 = D76<42>;
781#[cfg(any(feature = "d76", feature = "wide"))]
782pub type D76s48 = D76<48>;
783#[cfg(any(feature = "d76", feature = "wide"))]
785pub type D76s50 = D76<50>;
786#[cfg(any(feature = "d76", feature = "wide"))]
787pub type D76s56 = D76<56>;
788#[cfg(any(feature = "d76", feature = "wide"))]
789pub type D76s64 = D76<64>;
790#[cfg(any(feature = "d76", feature = "wide"))]
791pub type D76s70 = D76<70>;
792#[cfg(any(feature = "d76", feature = "wide"))]
795pub type D76s75 = D76<75>;
796
797#[cfg(any(feature = "d153", feature = "wide"))]
815pub type D153<const SCALE: u32> = crate::D<crate::int::types::Int<8>, SCALE>;
816
817#[cfg(any(feature = "d153", feature = "wide"))]
824impl<const SCALE: u32> Default for crate::D<crate::int::types::Int<8>, SCALE> {
825 #[inline]
826 fn default() -> Self {
827 Self::ZERO
828 }
829}
830
831#[cfg(any(feature = "d153", feature = "wide"))]
832crate::macros::full::decl_decimal_full!(
833 wide D153,
834 crate::int::types::Int<8>,
835 crate::int::types::Uint<8>,
836 crate::int::types::Int<16>,
837 crate::int::types::Int<16>,
838 crate::int::types::Int<32>,
839 crate::int::types::Int<32>,
840 crate::int::types::Int<64>,
841 crate::int::types::Int<32>,
842 wide_trig_d153,
843 152,
844 8,
845 200,
846 512
847);
848#[cfg(any(feature = "d153", feature = "wide"))]
850crate::macros::conversions::decl_cross_width_widening!(wide D153, crate::int::types::Int<8>, D38, crate::int::types::Int<2>);
851#[cfg(all(
852 any(feature = "d153", feature = "wide"),
853 any(feature = "d76", feature = "wide")
854))]
855crate::macros::conversions::decl_cross_width_widening!(wide D153, crate::int::types::Int<8>, D76, crate::int::types::Int<4>);
856#[cfg(all(
858 any(feature = "d153", feature = "wide"),
859 any(feature = "d76", feature = "wide")
860))]
861crate::macros::conversions::decl_cross_width_narrowing!(wide D76, crate::int::types::Int<4>, D153, crate::int::types::Int<8>);
862#[cfg(any(feature = "d153", feature = "wide"))]
863crate::macros::conversions::decl_cross_width_narrowing!(wide D38, crate::int::types::Int<2>, D153, crate::int::types::Int<8>);
864
865#[cfg(all(
868 any(feature = "d76", feature = "wide"),
869 any(feature = "d115", feature = "wide")
870))]
871impl<const SCALE: u32> crate::D<crate::int::types::Int<4>, SCALE> {
872 #[inline]
875 #[must_use]
876 pub fn widen(self) -> crate::D<crate::int::types::Int<6>, SCALE> {
877 self.into()
878 }
879}
880
881#[cfg(any(feature = "d153", feature = "wide"))]
882impl<const SCALE: u32> crate::D<crate::int::types::Int<8>, SCALE> {
883 #[cfg(any(feature = "d115", feature = "wide"))]
887 #[inline]
888 pub fn narrow(self) -> Result<crate::D<crate::int::types::Int<6>, SCALE>, crate::support::error::ConvertError> {
889 self.try_into()
890 }
891}
892
893#[cfg(any(feature = "d153", feature = "wide"))]
895pub type D153s0 = D153<0>;
896#[cfg(any(feature = "d153", feature = "wide"))]
897pub type D153s1 = D153<1>;
898#[cfg(any(feature = "d153", feature = "wide"))]
899pub type D153s2 = D153<2>;
900#[cfg(any(feature = "d153", feature = "wide"))]
901pub type D153s4 = D153<4>;
902#[cfg(any(feature = "d153", feature = "wide"))]
903pub type D153s6 = D153<6>;
904#[cfg(any(feature = "d153", feature = "wide"))]
905pub type D153s9 = D153<9>;
906#[cfg(any(feature = "d153", feature = "wide"))]
907pub type D153s12 = D153<12>;
908#[cfg(any(feature = "d153", feature = "wide"))]
909pub type D153s15 = D153<15>;
910#[cfg(any(feature = "d153", feature = "wide"))]
911pub type D153s18 = D153<18>;
912#[cfg(any(feature = "d153", feature = "wide"))]
913pub type D153s20 = D153<20>;
914#[cfg(any(feature = "d153", feature = "wide"))]
915pub type D153s24 = D153<24>;
916#[cfg(any(feature = "d153", feature = "wide"))]
917pub type D153s28 = D153<28>;
918#[cfg(any(feature = "d153", feature = "wide"))]
919pub type D153s32 = D153<32>;
920#[cfg(any(feature = "d153", feature = "wide"))]
922pub type D153s35 = D153<35>;
923#[cfg(any(feature = "d153", feature = "wide"))]
924pub type D153s38 = D153<38>;
925#[cfg(any(feature = "d153", feature = "wide"))]
926pub type D153s50 = D153<50>;
927#[cfg(any(feature = "d153", feature = "wide"))]
928pub type D153s57 = D153<57>;
929#[cfg(any(feature = "d153", feature = "wide"))]
931pub type D153s75 = D153<75>;
932#[cfg(any(feature = "d153", feature = "wide"))]
933pub type D153s76 = D153<76>;
934#[cfg(any(feature = "d153", feature = "wide"))]
935pub type D153s100 = D153<100>;
936#[cfg(any(feature = "d153", feature = "wide"))]
937pub type D153s115 = D153<115>;
938#[cfg(any(feature = "d153", feature = "wide"))]
939pub type D153s140 = D153<140>;
940#[cfg(any(feature = "d153", feature = "wide"))]
942pub type D153s150 = D153<150>;
943#[cfg(any(feature = "d153", feature = "wide"))]
946pub type D153s152 = D153<152>;
947
948#[cfg(any(feature = "d307", feature = "wide"))]
966pub type D307<const SCALE: u32> = crate::D<crate::int::types::Int<16>, SCALE>;
967
968#[cfg(any(feature = "d307", feature = "wide"))]
975impl<const SCALE: u32> Default for crate::D<crate::int::types::Int<16>, SCALE> {
976 #[inline]
977 fn default() -> Self {
978 Self::ZERO
979 }
980}
981
982#[cfg(any(feature = "d307", feature = "wide"))]
983crate::macros::full::decl_decimal_full!(
984 wide D307,
985 crate::int::types::Int<16>,
986 crate::int::types::Uint<16>,
987 crate::int::types::Int<32>,
988 crate::int::types::Int<32>,
989 crate::int::types::Int<64>,
990 crate::int::types::Int<64>,
991 crate::int::types::Int<128>,
992 crate::int::types::Int<64>,
993 wide_trig_d307,
994 306,
995 16,
996 400,
997 512
998);
999#[cfg(all(
1001 any(feature = "d307", feature = "wide"),
1002 any(feature = "d76", feature = "wide")
1003))]
1004crate::macros::conversions::decl_cross_width_widening!(wide D307, crate::int::types::Int<16>, D76, crate::int::types::Int<4>);
1005#[cfg(all(
1006 any(feature = "d307", feature = "wide"),
1007 any(feature = "d153", feature = "wide")
1008))]
1009crate::macros::conversions::decl_cross_width_widening!(wide D307, crate::int::types::Int<16>, D153, crate::int::types::Int<8>);
1010#[cfg(all(
1012 any(feature = "d307", feature = "wide"),
1013 any(feature = "d153", feature = "wide")
1014))]
1015crate::macros::conversions::decl_cross_width_narrowing!(wide D153, crate::int::types::Int<8>, D307, crate::int::types::Int<16>);
1016#[cfg(all(
1017 any(feature = "d307", feature = "wide"),
1018 any(feature = "d76", feature = "wide")
1019))]
1020crate::macros::conversions::decl_cross_width_narrowing!(wide D76, crate::int::types::Int<4>, D307, crate::int::types::Int<16>);
1021
1022#[cfg(all(
1025 any(feature = "d153", feature = "wide"),
1026 any(feature = "d230", feature = "wide")
1027))]
1028impl<const SCALE: u32> crate::D<crate::int::types::Int<8>, SCALE> {
1029 #[inline]
1032 #[must_use]
1033 pub fn widen(self) -> crate::D<crate::int::types::Int<12>, SCALE> {
1034 self.into()
1035 }
1036}
1037
1038#[cfg(any(feature = "d307", feature = "wide"))]
1039impl<const SCALE: u32> crate::D<crate::int::types::Int<16>, SCALE> {
1040 #[cfg(any(feature = "d230", feature = "wide"))]
1044 #[inline]
1045 pub fn narrow(self) -> Result<crate::D<crate::int::types::Int<12>, SCALE>, crate::support::error::ConvertError> {
1046 self.try_into()
1047 }
1048
1049 #[cfg(any(feature = "d462", feature = "x-wide"))]
1052 #[inline]
1053 #[must_use]
1054 pub fn widen(self) -> crate::D<crate::int::types::Int<24>, SCALE> {
1055 self.into()
1056 }
1057}
1058
1059#[cfg(any(feature = "d307", feature = "wide"))]
1061pub type D307s0 = D307<0>;
1062#[cfg(any(feature = "d307", feature = "wide"))]
1063pub type D307s1 = D307<1>;
1064#[cfg(any(feature = "d307", feature = "wide"))]
1065pub type D307s2 = D307<2>;
1066#[cfg(any(feature = "d307", feature = "wide"))]
1067pub type D307s4 = D307<4>;
1068#[cfg(any(feature = "d307", feature = "wide"))]
1069pub type D307s6 = D307<6>;
1070#[cfg(any(feature = "d307", feature = "wide"))]
1071pub type D307s9 = D307<9>;
1072#[cfg(any(feature = "d307", feature = "wide"))]
1073pub type D307s12 = D307<12>;
1074#[cfg(any(feature = "d307", feature = "wide"))]
1075pub type D307s15 = D307<15>;
1076#[cfg(any(feature = "d307", feature = "wide"))]
1077pub type D307s18 = D307<18>;
1078#[cfg(any(feature = "d307", feature = "wide"))]
1079pub type D307s20 = D307<20>;
1080#[cfg(any(feature = "d307", feature = "wide"))]
1081pub type D307s24 = D307<24>;
1082#[cfg(any(feature = "d307", feature = "wide"))]
1083pub type D307s28 = D307<28>;
1084#[cfg(any(feature = "d307", feature = "wide"))]
1085pub type D307s32 = D307<32>;
1086#[cfg(any(feature = "d307", feature = "wide"))]
1088pub type D307s35 = D307<35>;
1089#[cfg(any(feature = "d307", feature = "wide"))]
1090pub type D307s38 = D307<38>;
1091#[cfg(any(feature = "d307", feature = "wide"))]
1092pub type D307s50 = D307<50>;
1093#[cfg(any(feature = "d307", feature = "wide"))]
1094pub type D307s75 = D307<75>;
1095#[cfg(any(feature = "d307", feature = "wide"))]
1096pub type D307s100 = D307<100>;
1097#[cfg(any(feature = "d307", feature = "wide"))]
1098pub type D307s115 = D307<115>;
1099#[cfg(any(feature = "d307", feature = "wide"))]
1101pub type D307s150 = D307<150>;
1102#[cfg(any(feature = "d307", feature = "wide"))]
1103pub type D307s153 = D307<153>;
1104#[cfg(any(feature = "d307", feature = "wide"))]
1105pub type D307s200 = D307<200>;
1106#[cfg(any(feature = "d307", feature = "wide"))]
1107pub type D307s230 = D307<230>;
1108#[cfg(any(feature = "d307", feature = "wide"))]
1109pub type D307s275 = D307<275>;
1110#[cfg(any(feature = "d307", feature = "wide"))]
1112pub type D307s300 = D307<300>;
1113#[cfg(any(feature = "d307", feature = "wide"))]
1116pub type D307s306 = D307<306>;
1117
1118#[cfg(any(feature = "d57", feature = "wide"))]
1145pub type D57<const SCALE: u32> = crate::D<crate::int::types::Int<3>, SCALE>;
1146
1147#[cfg(any(feature = "d57", feature = "wide"))]
1154impl<const SCALE: u32> Default for crate::D<crate::int::types::Int<3>, SCALE> {
1155 #[inline]
1156 fn default() -> Self {
1157 Self::ZERO
1158 }
1159}
1160
1161#[cfg(any(feature = "d57", feature = "wide"))]
1162crate::macros::full::decl_decimal_full!(
1163 wide D57,
1164 crate::int::types::Int<3>,
1165 crate::int::types::Uint<3>,
1166 crate::int::types::Int<6>,
1167 crate::int::types::Int<6>,
1168 crate::int::types::Int<8>,
1169 crate::int::types::Int<16>,
1170 crate::int::types::Int<32>,
1171 crate::int::types::Int<16>,
1172 wide_trig_d57,
1173 56,
1174 3,
1175 100,
1176 128
1177);
1178#[cfg(any(feature = "d57", feature = "wide"))]
1179pub type D57s0 = D57<0>;
1180#[cfg(any(feature = "d57", feature = "wide"))]
1181pub type D57s1 = D57<1>;
1182#[cfg(any(feature = "d57", feature = "wide"))]
1183pub type D57s2 = D57<2>;
1184#[cfg(any(feature = "d57", feature = "wide"))]
1185pub type D57s4 = D57<4>;
1186#[cfg(any(feature = "d57", feature = "wide"))]
1187pub type D57s6 = D57<6>;
1188#[cfg(any(feature = "d57", feature = "wide"))]
1189pub type D57s9 = D57<9>;
1190#[cfg(any(feature = "d57", feature = "wide"))]
1191pub type D57s12 = D57<12>;
1192#[cfg(any(feature = "d57", feature = "wide"))]
1193pub type D57s18 = D57<18>;
1194#[cfg(any(feature = "d57", feature = "wide"))]
1195pub type D57s20 = D57<20>;
1196#[cfg(any(feature = "d57", feature = "wide"))]
1197pub type D57s24 = D57<24>;
1198#[cfg(any(feature = "d57", feature = "wide"))]
1199pub type D57s28 = D57<28>;
1200#[cfg(any(feature = "d57", feature = "wide"))]
1201pub type D57s32 = D57<32>;
1202#[cfg(any(feature = "d57", feature = "wide"))]
1203pub type D57s38 = D57<38>;
1204#[cfg(any(feature = "d57", feature = "wide"))]
1205pub type D57s42 = D57<42>;
1206#[cfg(any(feature = "d57", feature = "wide"))]
1207pub type D57s48 = D57<48>;
1208#[cfg(any(feature = "d57", feature = "wide"))]
1209pub type D57s52 = D57<52>;
1210#[cfg(any(feature = "d57", feature = "wide"))]
1213pub type D57s56 = D57<56>;
1214
1215#[cfg(any(feature = "d115", feature = "wide"))]
1228pub type D115<const SCALE: u32> = crate::D<crate::int::types::Int<6>, SCALE>;
1229
1230#[cfg(any(feature = "d115", feature = "wide"))]
1237impl<const SCALE: u32> Default for crate::D<crate::int::types::Int<6>, SCALE> {
1238 #[inline]
1239 fn default() -> Self {
1240 Self::ZERO
1241 }
1242}
1243
1244#[cfg(any(feature = "d115", feature = "wide"))]
1245crate::macros::full::decl_decimal_full!(
1246 wide D115,
1247 crate::int::types::Int<6>,
1248 crate::int::types::Uint<6>,
1249 crate::int::types::Int<12>,
1250 crate::int::types::Int<12>,
1251 crate::int::types::Int<16>,
1252 crate::int::types::Int<32>,
1253 crate::int::types::Int<64>,
1254 crate::int::types::Int<32>,
1255 wide_trig_d115,
1256 114,
1257 6,
1258 200,
1259 512
1260);
1261#[cfg(any(feature = "d115", feature = "wide"))]
1262pub type D115s0 = D115<0>;
1263#[cfg(any(feature = "d115", feature = "wide"))]
1264pub type D115s1 = D115<1>;
1265#[cfg(any(feature = "d115", feature = "wide"))]
1266pub type D115s4 = D115<4>;
1267#[cfg(any(feature = "d115", feature = "wide"))]
1268pub type D115s8 = D115<8>;
1269#[cfg(any(feature = "d115", feature = "wide"))]
1270pub type D115s16 = D115<16>;
1271#[cfg(any(feature = "d115", feature = "wide"))]
1272pub type D115s24 = D115<24>;
1273#[cfg(any(feature = "d115", feature = "wide"))]
1274pub type D115s32 = D115<32>;
1275#[cfg(any(feature = "d115", feature = "wide"))]
1276pub type D115s38 = D115<38>;
1277#[cfg(any(feature = "d115", feature = "wide"))]
1278pub type D115s50 = D115<50>;
1279#[cfg(any(feature = "d115", feature = "wide"))]
1280pub type D115s57 = D115<57>;
1281#[cfg(any(feature = "d115", feature = "wide"))]
1282pub type D115s64 = D115<64>;
1283#[cfg(any(feature = "d115", feature = "wide"))]
1284pub type D115s76 = D115<76>;
1285#[cfg(any(feature = "d115", feature = "wide"))]
1286pub type D115s90 = D115<90>;
1287#[cfg(any(feature = "d115", feature = "wide"))]
1288pub type D115s100 = D115<100>;
1289#[cfg(any(feature = "d115", feature = "wide"))]
1290pub type D115s110 = D115<110>;
1291#[cfg(any(feature = "d115", feature = "wide"))]
1294pub type D115s114 = D115<114>;
1295
1296#[cfg(any(feature = "d230", feature = "wide"))]
1309pub type D230<const SCALE: u32> = crate::D<crate::int::types::Int<12>, SCALE>;
1310
1311#[cfg(any(feature = "d230", feature = "wide"))]
1318impl<const SCALE: u32> Default for crate::D<crate::int::types::Int<12>, SCALE> {
1319 #[inline]
1320 fn default() -> Self {
1321 Self::ZERO
1322 }
1323}
1324
1325#[cfg(any(feature = "d230", feature = "wide"))]
1326crate::macros::full::decl_decimal_full!(
1327 wide D230,
1328 crate::int::types::Int<12>,
1329 crate::int::types::Uint<12>,
1330 crate::int::types::Int<24>,
1331 crate::int::types::Int<24>,
1332 crate::int::types::Int<48>,
1333 crate::int::types::Int<48>,
1334 crate::int::types::Int<96>,
1335 crate::int::types::Int<48>,
1336 wide_trig_d230,
1337 229,
1338 12,
1339 400,
1340 512
1341);
1342#[cfg(any(feature = "d230", feature = "wide"))]
1343pub type D230s0 = D230<0>;
1344#[cfg(any(feature = "d230", feature = "wide"))]
1345pub type D230s1 = D230<1>;
1346#[cfg(any(feature = "d230", feature = "wide"))]
1347pub type D230s6 = D230<6>;
1348#[cfg(any(feature = "d230", feature = "wide"))]
1349pub type D230s18 = D230<18>;
1350#[cfg(any(feature = "d230", feature = "wide"))]
1351pub type D230s38 = D230<38>;
1352#[cfg(any(feature = "d230", feature = "wide"))]
1353pub type D230s57 = D230<57>;
1354#[cfg(any(feature = "d230", feature = "wide"))]
1355pub type D230s75 = D230<75>;
1356#[cfg(any(feature = "d230", feature = "wide"))]
1357pub type D230s100 = D230<100>;
1358#[cfg(any(feature = "d230", feature = "wide"))]
1359pub type D230s115 = D230<115>;
1360#[cfg(any(feature = "d230", feature = "wide"))]
1361pub type D230s140 = D230<140>;
1362#[cfg(any(feature = "d230", feature = "wide"))]
1363pub type D230s153 = D230<153>;
1364#[cfg(any(feature = "d230", feature = "wide"))]
1365pub type D230s175 = D230<175>;
1366#[cfg(any(feature = "d230", feature = "wide"))]
1367pub type D230s200 = D230<200>;
1368#[cfg(any(feature = "d230", feature = "wide"))]
1369pub type D230s215 = D230<215>;
1370#[cfg(any(feature = "d230", feature = "wide"))]
1371pub type D230s225 = D230<225>;
1372#[cfg(any(feature = "d230", feature = "wide"))]
1375pub type D230s229 = D230<229>;
1376
1377#[cfg(any(feature = "d462", feature = "x-wide"))]
1390pub type D462<const SCALE: u32> = crate::D<crate::int::types::Int<24>, SCALE>;
1391
1392#[cfg(any(feature = "d462", feature = "x-wide"))]
1399impl<const SCALE: u32> Default for crate::D<crate::int::types::Int<24>, SCALE> {
1400 #[inline]
1401 fn default() -> Self {
1402 Self::ZERO
1403 }
1404}
1405
1406#[cfg(any(feature = "d462", feature = "x-wide"))]
1407crate::macros::full::decl_decimal_full!(
1408 wide D462,
1409 crate::int::types::Int<24>,
1410 crate::int::types::Uint<24>,
1411 crate::int::types::Int<48>,
1412 crate::int::types::Int<48>,
1413 crate::int::types::Int<64>,
1414 crate::int::types::Int<64>,
1415 crate::int::types::Int<128>,
1416 crate::int::types::Int<64>,
1417 wide_trig_d462,
1418 461,
1419 24,
1420 400,
1421 512
1422);
1423#[cfg(any(feature = "d462", feature = "x-wide"))]
1424pub type D462s0 = D462<0>;
1425#[cfg(any(feature = "d462", feature = "x-wide"))]
1426pub type D462s1 = D462<1>;
1427#[cfg(any(feature = "d462", feature = "x-wide"))]
1428pub type D462s18 = D462<18>;
1429#[cfg(any(feature = "d462", feature = "x-wide"))]
1430pub type D462s38 = D462<38>;
1431#[cfg(any(feature = "d462", feature = "x-wide"))]
1432pub type D462s75 = D462<75>;
1433#[cfg(any(feature = "d462", feature = "x-wide"))]
1434pub type D462s115 = D462<115>;
1435#[cfg(any(feature = "d462", feature = "x-wide"))]
1436pub type D462s153 = D462<153>;
1437#[cfg(any(feature = "d462", feature = "x-wide"))]
1438pub type D462s200 = D462<200>;
1439#[cfg(any(feature = "d462", feature = "x-wide"))]
1440pub type D462s230 = D462<230>;
1441#[cfg(any(feature = "d462", feature = "x-wide"))]
1442pub type D462s275 = D462<275>;
1443#[cfg(any(feature = "d462", feature = "x-wide"))]
1444pub type D462s307 = D462<307>;
1445#[cfg(any(feature = "d462", feature = "x-wide"))]
1446pub type D462s350 = D462<350>;
1447#[cfg(any(feature = "d462", feature = "x-wide"))]
1448pub type D462s400 = D462<400>;
1449#[cfg(any(feature = "d462", feature = "x-wide"))]
1450pub type D462s440 = D462<440>;
1451#[cfg(any(feature = "d462", feature = "x-wide"))]
1452pub type D462s460 = D462<460>;
1453#[cfg(any(feature = "d462", feature = "x-wide"))]
1456pub type D462s461 = D462<461>;
1457
1458#[cfg(any(feature = "d616", feature = "x-wide"))]
1472pub type D616<const SCALE: u32> = crate::D<crate::int::types::Int<32>, SCALE>;
1473
1474#[cfg(any(feature = "d616", feature = "x-wide"))]
1481impl<const SCALE: u32> Default for crate::D<crate::int::types::Int<32>, SCALE> {
1482 #[inline]
1483 fn default() -> Self {
1484 Self::ZERO
1485 }
1486}
1487
1488#[cfg(any(feature = "d616", feature = "x-wide"))]
1489crate::macros::full::decl_decimal_full!(
1490 wide D616,
1491 crate::int::types::Int<32>,
1492 crate::int::types::Uint<32>,
1493 crate::int::types::Int<64>,
1494 crate::int::types::Int<64>,
1495 crate::int::types::Int<128>,
1496 crate::int::types::Int<96>,
1497 crate::int::types::Int<256>,
1498 crate::int::types::Int<128>,
1499 wide_trig_d616,
1500 615,
1501 32,
1502 400,
1503 512
1504);
1505#[cfg(any(feature = "d616", feature = "x-wide"))]
1506pub type D616s0 = D616<0>;
1507#[cfg(any(feature = "d616", feature = "x-wide"))]
1508pub type D616s1 = D616<1>;
1509#[cfg(any(feature = "d616", feature = "x-wide"))]
1510pub type D616s38 = D616<38>;
1511#[cfg(any(feature = "d616", feature = "x-wide"))]
1512pub type D616s75 = D616<75>;
1513#[cfg(any(feature = "d616", feature = "x-wide"))]
1514pub type D616s115 = D616<115>;
1515#[cfg(any(feature = "d616", feature = "x-wide"))]
1516pub type D616s153 = D616<153>;
1517#[cfg(any(feature = "d616", feature = "x-wide"))]
1518pub type D616s200 = D616<200>;
1519#[cfg(any(feature = "d616", feature = "x-wide"))]
1520pub type D616s230 = D616<230>;
1521#[cfg(any(feature = "d616", feature = "x-wide"))]
1522pub type D616s275 = D616<275>;
1523#[cfg(any(feature = "d616", feature = "x-wide"))]
1524pub type D616s308 = D616<308>;
1525#[cfg(any(feature = "d616", feature = "x-wide"))]
1526pub type D616s380 = D616<380>;
1527#[cfg(any(feature = "d616", feature = "x-wide"))]
1528pub type D616s462 = D616<462>;
1529#[cfg(any(feature = "d616", feature = "x-wide"))]
1530pub type D616s500 = D616<500>;
1531#[cfg(any(feature = "d616", feature = "x-wide"))]
1532pub type D616s555 = D616<555>;
1533#[cfg(any(feature = "d616", feature = "x-wide"))]
1534pub type D616s600 = D616<600>;
1535#[cfg(any(feature = "d616", feature = "x-wide"))]
1538pub type D616s615 = D616<615>;
1539
1540#[cfg(any(feature = "d924", feature = "xx-wide"))]
1553pub type D924<const SCALE: u32> = crate::D<crate::int::types::Int<48>, SCALE>;
1554
1555#[cfg(any(feature = "d924", feature = "xx-wide"))]
1562impl<const SCALE: u32> Default for crate::D<crate::int::types::Int<48>, SCALE> {
1563 #[inline]
1564 fn default() -> Self {
1565 Self::ZERO
1566 }
1567}
1568
1569#[cfg(any(feature = "d924", feature = "xx-wide"))]
1570crate::macros::full::decl_decimal_full!(
1574 wide D924,
1575 crate::int::types::Int<48>,
1576 crate::int::types::Uint<48>,
1577 crate::int::types::Int<96>,
1578 crate::int::types::Int<96>,
1579 crate::int::types::Int<192>,
1580 crate::int::types::Int<128>,
1581 crate::int::types::Int<256>,
1582 crate::int::types::Int<192>,
1583 wide_trig_d924,
1584 923,
1585 48,
1586 400,
1587 512,
1588 no_const_table
1589);
1590#[cfg(any(feature = "d924", feature = "xx-wide"))]
1591pub type D924s0 = D924<0>;
1592#[cfg(any(feature = "d924", feature = "xx-wide"))]
1593pub type D924s1 = D924<1>;
1594#[cfg(any(feature = "d924", feature = "xx-wide"))]
1595pub type D924s75 = D924<75>;
1596#[cfg(any(feature = "d924", feature = "xx-wide"))]
1597pub type D924s153 = D924<153>;
1598#[cfg(any(feature = "d924", feature = "xx-wide"))]
1599pub type D924s230 = D924<230>;
1600#[cfg(any(feature = "d924", feature = "xx-wide"))]
1601pub type D924s307 = D924<307>;
1602#[cfg(any(feature = "d924", feature = "xx-wide"))]
1603pub type D924s400 = D924<400>;
1604#[cfg(any(feature = "d924", feature = "xx-wide"))]
1605pub type D924s461 = D924<461>;
1606#[cfg(any(feature = "d924", feature = "xx-wide"))]
1607pub type D924s462 = D924<462>;
1608#[cfg(any(feature = "d924", feature = "xx-wide"))]
1609pub type D924s500 = D924<500>;
1610#[cfg(any(feature = "d924", feature = "xx-wide"))]
1611pub type D924s616 = D924<616>;
1612#[cfg(any(feature = "d924", feature = "xx-wide"))]
1613pub type D924s700 = D924<700>;
1614#[cfg(any(feature = "d924", feature = "xx-wide"))]
1615pub type D924s800 = D924<800>;
1616#[cfg(any(feature = "d924", feature = "xx-wide"))]
1617pub type D924s860 = D924<860>;
1618#[cfg(any(feature = "d924", feature = "xx-wide"))]
1619pub type D924s900 = D924<900>;
1620#[cfg(any(feature = "d924", feature = "xx-wide"))]
1621pub type D924s920 = D924<920>;
1622#[cfg(any(feature = "d924", feature = "xx-wide"))]
1625pub type D924s923 = D924<923>;
1626
1627#[cfg(any(feature = "d1232", feature = "xx-wide"))]
1640pub type D1232<const SCALE: u32> = crate::D<crate::int::types::Int<64>, SCALE>;
1641
1642#[cfg(any(feature = "d1232", feature = "xx-wide"))]
1649impl<const SCALE: u32> Default for crate::D<crate::int::types::Int<64>, SCALE> {
1650 #[inline]
1651 fn default() -> Self {
1652 Self::ZERO
1653 }
1654}
1655
1656#[cfg(any(feature = "d1232", feature = "xx-wide"))]
1657crate::macros::full::decl_decimal_full!(
1661 wide D1232,
1662 crate::int::types::Int<64>,
1663 crate::int::types::Uint<64>,
1664 crate::int::types::Int<128>,
1665 crate::int::types::Int<128>,
1666 crate::int::types::Int<256>,
1667 crate::int::types::Int<176>,
1668 crate::int::types::Int<512>,
1669 crate::int::types::Int<256>,
1670 wide_trig_d1232,
1671 1231,
1672 64,
1673 400,
1674 512,
1675 no_const_table
1676);
1677#[cfg(any(feature = "d1232", feature = "xx-wide"))]
1678pub type D1232s0 = D1232<0>;
1679#[cfg(any(feature = "d1232", feature = "xx-wide"))]
1680pub type D1232s1 = D1232<1>;
1681#[cfg(any(feature = "d1232", feature = "xx-wide"))]
1682pub type D1232s75 = D1232<75>;
1683#[cfg(any(feature = "d1232", feature = "xx-wide"))]
1684pub type D1232s153 = D1232<153>;
1685#[cfg(any(feature = "d1232", feature = "xx-wide"))]
1686pub type D1232s230 = D1232<230>;
1687#[cfg(any(feature = "d1232", feature = "xx-wide"))]
1688pub type D1232s307 = D1232<307>;
1689#[cfg(any(feature = "d1232", feature = "xx-wide"))]
1690pub type D1232s461 = D1232<461>;
1691#[cfg(any(feature = "d1232", feature = "xx-wide"))]
1692pub type D1232s616 = D1232<616>;
1693#[cfg(any(feature = "d1232", feature = "xx-wide"))]
1694pub type D1232s700 = D1232<700>;
1695#[cfg(any(feature = "d1232", feature = "xx-wide"))]
1696pub type D1232s800 = D1232<800>;
1697#[cfg(any(feature = "d1232", feature = "xx-wide"))]
1698pub type D1232s900 = D1232<900>;
1699#[cfg(any(feature = "d1232", feature = "xx-wide"))]
1700pub type D1232s924 = D1232<924>;
1701#[cfg(any(feature = "d1232", feature = "xx-wide"))]
1702pub type D1232s1000 = D1232<1000>;
1703#[cfg(any(feature = "d1232", feature = "xx-wide"))]
1704pub type D1232s1100 = D1232<1100>;
1705#[cfg(any(feature = "d1232", feature = "xx-wide"))]
1706pub type D1232s1180 = D1232<1180>;
1707#[cfg(any(feature = "d1232", feature = "xx-wide"))]
1708pub type D1232s1220 = D1232<1220>;
1709#[cfg(any(feature = "d1232", feature = "xx-wide"))]
1710pub type D1232s1230 = D1232<1230>;
1711#[cfg(any(feature = "d1232", feature = "xx-wide"))]
1714pub type D1232s1231 = D1232<1231>;
1715
1716#[cfg(any(feature = "d57", feature = "wide"))]
1740crate::macros::conversions::decl_cross_width_widening!(wide D57, crate::int::types::Int<3>, D38, crate::int::types::Int<2>);
1741#[cfg(any(feature = "d57", feature = "wide"))]
1742crate::macros::conversions::decl_cross_width_narrowing!(wide D38, crate::int::types::Int<2>, D57, crate::int::types::Int<3>);
1743
1744#[cfg(all(
1746 any(feature = "d57", feature = "wide"),
1747 any(feature = "d76", feature = "wide")
1748))]
1749crate::macros::conversions::decl_cross_width_widening!(wide D76, crate::int::types::Int<4>, D57, crate::int::types::Int<3>);
1750#[cfg(all(
1751 any(feature = "d57", feature = "wide"),
1752 any(feature = "d76", feature = "wide")
1753))]
1754crate::macros::conversions::decl_cross_width_narrowing!(wide D57, crate::int::types::Int<3>, D76, crate::int::types::Int<4>);
1755
1756#[cfg(all(
1758 any(feature = "d76", feature = "wide"),
1759 any(feature = "d115", feature = "wide")
1760))]
1761crate::macros::conversions::decl_cross_width_widening!(wide D115, crate::int::types::Int<6>, D76, crate::int::types::Int<4>);
1762#[cfg(all(
1763 any(feature = "d76", feature = "wide"),
1764 any(feature = "d115", feature = "wide")
1765))]
1766crate::macros::conversions::decl_cross_width_narrowing!(wide D76, crate::int::types::Int<4>, D115, crate::int::types::Int<6>);
1767
1768#[cfg(all(
1770 any(feature = "d115", feature = "wide"),
1771 any(feature = "d153", feature = "wide")
1772))]
1773crate::macros::conversions::decl_cross_width_widening!(wide D153, crate::int::types::Int<8>, D115, crate::int::types::Int<6>);
1774#[cfg(all(
1775 any(feature = "d115", feature = "wide"),
1776 any(feature = "d153", feature = "wide")
1777))]
1778crate::macros::conversions::decl_cross_width_narrowing!(wide D115, crate::int::types::Int<6>, D153, crate::int::types::Int<8>);
1779
1780#[cfg(all(
1782 any(feature = "d153", feature = "wide"),
1783 any(feature = "d230", feature = "wide")
1784))]
1785crate::macros::conversions::decl_cross_width_widening!(wide D230, crate::int::types::Int<12>, D153, crate::int::types::Int<8>);
1786#[cfg(all(
1787 any(feature = "d153", feature = "wide"),
1788 any(feature = "d230", feature = "wide")
1789))]
1790crate::macros::conversions::decl_cross_width_narrowing!(wide D153, crate::int::types::Int<8>, D230, crate::int::types::Int<12>);
1791
1792#[cfg(all(
1794 any(feature = "d230", feature = "wide"),
1795 any(feature = "d307", feature = "wide")
1796))]
1797crate::macros::conversions::decl_cross_width_widening!(wide D307, crate::int::types::Int<16>, D230, crate::int::types::Int<12>);
1798#[cfg(all(
1799 any(feature = "d230", feature = "wide"),
1800 any(feature = "d307", feature = "wide")
1801))]
1802crate::macros::conversions::decl_cross_width_narrowing!(wide D230, crate::int::types::Int<12>, D307, crate::int::types::Int<16>);
1803
1804#[cfg(all(
1806 any(feature = "d307", feature = "wide"),
1807 any(feature = "d462", feature = "x-wide")
1808))]
1809crate::macros::conversions::decl_cross_width_widening!(wide D462, crate::int::types::Int<24>, D307, crate::int::types::Int<16>);
1810#[cfg(all(
1811 any(feature = "d307", feature = "wide"),
1812 any(feature = "d462", feature = "x-wide")
1813))]
1814crate::macros::conversions::decl_cross_width_narrowing!(wide D307, crate::int::types::Int<16>, D462, crate::int::types::Int<24>);
1815
1816#[cfg(all(
1818 any(feature = "d462", feature = "x-wide"),
1819 any(feature = "d616", feature = "x-wide")
1820))]
1821crate::macros::conversions::decl_cross_width_widening!(wide D616, crate::int::types::Int<32>, D462, crate::int::types::Int<24>);
1822#[cfg(all(
1823 any(feature = "d462", feature = "x-wide"),
1824 any(feature = "d616", feature = "x-wide")
1825))]
1826crate::macros::conversions::decl_cross_width_narrowing!(wide D462, crate::int::types::Int<24>, D616, crate::int::types::Int<32>);
1827
1828#[cfg(all(
1830 any(feature = "d616", feature = "x-wide"),
1831 any(feature = "d924", feature = "xx-wide")
1832))]
1833crate::macros::conversions::decl_cross_width_widening!(wide D924, crate::int::types::Int<48>, D616, crate::int::types::Int<32>);
1834#[cfg(all(
1835 any(feature = "d616", feature = "x-wide"),
1836 any(feature = "d924", feature = "xx-wide")
1837))]
1838crate::macros::conversions::decl_cross_width_narrowing!(wide D616, crate::int::types::Int<32>, D924, crate::int::types::Int<48>);
1839
1840#[cfg(all(
1842 any(feature = "d924", feature = "xx-wide"),
1843 any(feature = "d1232", feature = "xx-wide")
1844))]
1845crate::macros::conversions::decl_cross_width_widening!(wide D1232, crate::int::types::Int<64>, D924, crate::int::types::Int<48>);
1846#[cfg(all(
1847 any(feature = "d924", feature = "xx-wide"),
1848 any(feature = "d1232", feature = "xx-wide")
1849))]
1850crate::macros::conversions::decl_cross_width_narrowing!(wide D924, crate::int::types::Int<48>, D1232, crate::int::types::Int<64>);
1851
1852#[cfg(any(feature = "d57", feature = "wide"))]
1860impl<const SCALE: u32> crate::D<crate::int::types::Int<3>, SCALE> {
1861 #[inline]
1864 pub fn narrow(self) -> Result<crate::D<crate::int::types::Int<2>, SCALE>, crate::support::error::ConvertError> {
1865 self.try_into()
1866 }
1867}
1868
1869#[cfg(all(
1873 any(feature = "d57", feature = "wide"),
1874 any(feature = "d76", feature = "wide"),
1875))]
1876impl<const SCALE: u32> crate::D<crate::int::types::Int<3>, SCALE> {
1877 #[inline]
1879 #[must_use]
1880 pub fn widen(self) -> crate::D<crate::int::types::Int<4>, SCALE> {
1881 self.into()
1882 }
1883}
1884
1885#[cfg(all(
1891 any(feature = "d115", feature = "wide"),
1892 any(feature = "d76", feature = "wide"),
1893))]
1894impl<const SCALE: u32> crate::D<crate::int::types::Int<6>, SCALE> {
1895 #[inline]
1897 pub fn narrow(self) -> Result<crate::D<crate::int::types::Int<4>, SCALE>, crate::support::error::ConvertError> {
1898 self.try_into()
1899 }
1900}
1901
1902#[cfg(all(
1903 any(feature = "d115", feature = "wide"),
1904 any(feature = "d153", feature = "wide"),
1905))]
1906impl<const SCALE: u32> crate::D<crate::int::types::Int<6>, SCALE> {
1907 #[inline]
1909 #[must_use]
1910 pub fn widen(self) -> crate::D<crate::int::types::Int<8>, SCALE> {
1911 self.into()
1912 }
1913}
1914
1915#[cfg(all(
1916 any(feature = "d230", feature = "wide"),
1917 any(feature = "d153", feature = "wide"),
1918))]
1919impl<const SCALE: u32> crate::D<crate::int::types::Int<12>, SCALE> {
1920 #[inline]
1922 pub fn narrow(self) -> Result<crate::D<crate::int::types::Int<8>, SCALE>, crate::support::error::ConvertError> {
1923 self.try_into()
1924 }
1925}
1926
1927#[cfg(all(
1928 any(feature = "d230", feature = "wide"),
1929 any(feature = "d307", feature = "wide"),
1930))]
1931impl<const SCALE: u32> crate::D<crate::int::types::Int<12>, SCALE> {
1932 #[inline]
1934 #[must_use]
1935 pub fn widen(self) -> crate::D<crate::int::types::Int<16>, SCALE> {
1936 self.into()
1937 }
1938}
1939
1940#[cfg(all(
1941 any(feature = "d462", feature = "x-wide"),
1942 any(feature = "d307", feature = "wide"),
1943))]
1944impl<const SCALE: u32> crate::D<crate::int::types::Int<24>, SCALE> {
1945 #[inline]
1947 pub fn narrow(self) -> Result<crate::D<crate::int::types::Int<16>, SCALE>, crate::support::error::ConvertError> {
1948 self.try_into()
1949 }
1950}
1951
1952#[cfg(all(
1953 any(feature = "d462", feature = "x-wide"),
1954 any(feature = "d616", feature = "x-wide"),
1955))]
1956impl<const SCALE: u32> crate::D<crate::int::types::Int<24>, SCALE> {
1957 #[inline]
1959 #[must_use]
1960 pub fn widen(self) -> crate::D<crate::int::types::Int<32>, SCALE> {
1961 self.into()
1962 }
1963}
1964
1965#[cfg(all(
1966 any(feature = "d616", feature = "x-wide"),
1967 any(feature = "d462", feature = "x-wide"),
1968))]
1969impl<const SCALE: u32> crate::D<crate::int::types::Int<32>, SCALE> {
1970 #[inline]
1972 pub fn narrow(self) -> Result<crate::D<crate::int::types::Int<24>, SCALE>, crate::support::error::ConvertError> {
1973 self.try_into()
1974 }
1975}
1976
1977#[cfg(all(
1982 any(feature = "d616", feature = "x-wide"),
1983 any(feature = "d924", feature = "xx-wide"),
1984))]
1985impl<const SCALE: u32> crate::D<crate::int::types::Int<32>, SCALE> {
1986 #[inline]
1988 #[must_use]
1989 pub fn widen(self) -> crate::D<crate::int::types::Int<48>, SCALE> {
1990 self.into()
1991 }
1992}
1993
1994#[cfg(all(
1995 any(feature = "d924", feature = "xx-wide"),
1996 any(feature = "d616", feature = "x-wide"),
1997))]
1998impl<const SCALE: u32> crate::D<crate::int::types::Int<48>, SCALE> {
1999 #[inline]
2001 pub fn narrow(self) -> Result<crate::D<crate::int::types::Int<32>, SCALE>, crate::support::error::ConvertError> {
2002 self.try_into()
2003 }
2004}
2005
2006#[cfg(all(
2007 any(feature = "d924", feature = "xx-wide"),
2008 any(feature = "d1232", feature = "xx-wide"),
2009))]
2010impl<const SCALE: u32> crate::D<crate::int::types::Int<48>, SCALE> {
2011 #[inline]
2013 #[must_use]
2014 pub fn widen(self) -> crate::D<crate::int::types::Int<64>, SCALE> {
2015 self.into()
2016 }
2017}
2018
2019#[cfg(all(
2020 any(feature = "d1232", feature = "xx-wide"),
2021 any(feature = "d924", feature = "xx-wide"),
2022))]
2023impl<const SCALE: u32> crate::D<crate::int::types::Int<64>, SCALE> {
2024 #[inline]
2027 pub fn narrow(self) -> Result<crate::D<crate::int::types::Int<48>, SCALE>, crate::support::error::ConvertError> {
2028 self.try_into()
2029 }
2030}
2031
2032impl<const N: usize, const SCALE: u32> crate::D<crate::int::types::Int<N>, SCALE> {
2049 #[inline]
2058 #[must_use]
2059 pub const fn widen_n<const M: usize>(self) -> crate::D<crate::int::types::Int<M>, SCALE> {
2060 debug_assert!(M >= N, "widen_n requires M >= N");
2061 crate::D(self.0.resize_n::<M>())
2062 }
2063
2064 #[inline]
2073 pub const fn narrow_n<const M: usize>(
2074 self,
2075 ) -> Option<crate::D<crate::int::types::Int<M>, SCALE>> {
2076 match self.0.try_narrow::<M>() {
2077 Some(raw) => Some(crate::D(raw)),
2078 None => None,
2079 }
2080 }
2081}
2082
2083crate::macros::cross_scale_ops::decl_decimal_cross_scale_ops!(D18, crate::int::types::Int<1>);
2096crate::macros::cross_scale_ops::decl_decimal_cross_scale_ops!(D38, crate::int::types::Int<2>);
2097
2098#[cfg(any(feature = "d57", feature = "wide"))]
2099crate::macros::cross_scale_ops::decl_decimal_cross_scale_ops!(D57, crate::int::types::Int<3>);
2100
2101#[cfg(any(feature = "d76", feature = "wide"))]
2102crate::macros::cross_scale_ops::decl_decimal_cross_scale_ops!(D76, crate::int::types::Int<4>);
2103
2104#[cfg(any(feature = "d115", feature = "wide"))]
2105crate::macros::cross_scale_ops::decl_decimal_cross_scale_ops!(D115, crate::int::types::Int<6>);
2106
2107#[cfg(any(feature = "d153", feature = "wide"))]
2108crate::macros::cross_scale_ops::decl_decimal_cross_scale_ops!(D153, crate::int::types::Int<8>);
2109
2110#[cfg(any(feature = "d230", feature = "wide"))]
2111crate::macros::cross_scale_ops::decl_decimal_cross_scale_ops!(D230, crate::int::types::Int<12>);
2112
2113#[cfg(any(feature = "d307", feature = "wide"))]
2114crate::macros::cross_scale_ops::decl_decimal_cross_scale_ops!(D307, crate::int::types::Int<16>);
2115
2116#[cfg(any(feature = "d462", feature = "x-wide"))]
2117crate::macros::cross_scale_ops::decl_decimal_cross_scale_ops!(D462, crate::int::types::Int<24>);
2118
2119#[cfg(any(feature = "d616", feature = "x-wide"))]
2120crate::macros::cross_scale_ops::decl_decimal_cross_scale_ops!(D616, crate::int::types::Int<32>);
2121
2122#[cfg(any(feature = "d924", feature = "xx-wide"))]
2123crate::macros::cross_scale_ops::decl_decimal_cross_scale_ops!(D924, crate::int::types::Int<48>);
2124
2125#[cfg(any(feature = "d1232", feature = "xx-wide"))]
2126crate::macros::cross_scale_ops::decl_decimal_cross_scale_ops!(D1232, crate::int::types::Int<64>);