mixed_num/
fixed_impl.rs

1use crate::*;
2use fixed;
3
4macro_rules! impl_mixed_num_conversion{
5    ( $T1:ty, $T2:ty ) => {
6        impl MixedNumConversion<$T2> for $T1
7        {
8            #[inline(always)]
9            fn mixed_from_num( number:$T2 ) -> Self {
10                return Self::from_num(number);
11            }
12            #[inline(always)]
13            fn mixed_to_num( &self ) -> $T2 {
14                return self.to_num::<$T2>();
15            }
16        }
17
18        impl MixedNumConversion<Cartesian<$T2>> for $T1
19        {
20            /// Extracts real part of self, including type cast to the target type.
21            #[inline(always)]
22            fn mixed_from_num( number:Cartesian<$T2> ) -> Self {
23                return Self::from_num(number.re);
24            }
25            /// Casting real number to a complex, including type cast of T1 to T2 (Cartesian<T2>).
26            #[inline(always)]
27            fn mixed_to_num( &self ) -> Cartesian<$T2> {
28                return Cartesian::new(self.to_num::<$T2>(), <$T2>::mixed_zero());
29            }
30        }
31    }
32}
33
34macro_rules! impl_mixed_num_for_fixed{
35    ( $T:ty ) => {
36
37        impl MixedNum  for $T
38        {
39        }
40
41        impl_mixed_num_conversion!($T, f32);
42        impl_mixed_num_conversion!($T, f64);
43        
44        impl_mixed_num_conversion!($T, usize);
45        impl_mixed_num_conversion!($T, isize);
46        
47        impl_mixed_num_conversion!($T, u8);
48        impl_mixed_num_conversion!($T, u16);
49        impl_mixed_num_conversion!($T, u32);
50        impl_mixed_num_conversion!($T, u64);
51        impl_mixed_num_conversion!($T, u128);
52
53        impl_mixed_num_conversion!($T, i8);
54        impl_mixed_num_conversion!($T, i16);
55        impl_mixed_num_conversion!($T, i32);
56        impl_mixed_num_conversion!($T, i64);
57        impl_mixed_num_conversion!($T, i128);
58
59        
60        /*
61        impl MixedNumConversion<Cartesian<$T>> for $T
62        {
63            /// Only uses the real part.
64            #[inline(always)]
65            fn mixed_from_num( number:Cartesian<$T> ) -> Self {
66                return number.re;
67            }
68            #[inline(always)]
69            fn mixed_to_num( &self ) -> Cartesian<$T> {
70                return Cartesian::new(*self, <$T>::mixed_zero());
71            }
72        }
73
74        impl MixedNumConversion<Cartesian<f32>> for $T
75        {
76            /// Only uses the real part.
77            #[inline(always)]
78            fn mixed_from_num( number:Cartesian<f32> ) -> Self {
79                return Self::from_num(number.re);
80            }
81            #[inline(always)]
82            fn mixed_to_num( &self ) -> Cartesian<f32> {
83                return Cartesian::new(self.to_num::<f32>(), f32::mixed_zero());
84            }
85        }
86
87        impl MixedNumConversion<Cartesian<f64>> for $T
88        {
89            /// Only uses the real part.
90            #[inline(always)]
91            fn mixed_from_num( number:Cartesian<f64> ) -> Self {
92                return Self::from_num(number.re);
93            }
94            #[inline(always)]
95            fn mixed_to_num( &self ) -> Cartesian<f64> {
96                return Cartesian::new(self.to_num::<f64>(), f64::mixed_zero());
97            }
98        }
99        */
100
101        impl MixedPi for $T
102        {
103            #[inline(always)]
104            fn mixed_pi() -> Self {
105                return Self::from_num(3.1415926535897932384626433832795028841971693993751058209749445923078164062);
106            }
107            #[inline(always)]
108            fn mixed_tau() -> Self {
109                return Self::from_num(6.2831853071795864769252867665590057683943387987502116419498891846156328124);
110            }
111        }
112
113        impl MixedZero for $T
114        {
115            /// Return the zero value of type Self.
116            #[inline(always)]
117            fn mixed_zero() -> Self {
118                return Self::from_num(0) as $T;
119            }
120        }
121
122        impl MixedOne for $T
123        {
124            /// Return the zero value of type Self.
125            #[inline(always)]
126            fn mixed_one() -> Self {
127                return Self::from_num(1) as $T;
128            }
129        }
130
131        impl MixedConsts for $T
132        {
133        }
134
135        impl MixedSqrt for $T
136        {
137            /// Take the square root of self.
138            #[inline(always)]
139            fn mixed_sqrt(&self) -> Self {
140                return trigonometry::sqrt::niirf(*self, 2);
141            }
142            /// Take the square root of self.
143            #[inline(always)]
144            fn mixed_niirf(&self) -> Self {
145                return trigonometry::sqrt::niirf(*self, 2);
146            }
147        }
148    }
149}
150
151macro_rules! impl_mixed_num_for_fixed_unsigned{
152    ( $T:ty ) => {
153        impl_mixed_num_for_fixed!($T);
154
155        impl MixedOps for $T
156        {
157        }
158
159        impl MixedAbs for $T
160        {
161            #[inline(always)]
162            fn mixed_abs( &self ) -> Self {
163                return *self; // Is itself for unsigned.
164            }
165        }
166
167        impl MixedPowi for $T
168        {
169            #[inline(always)]
170            fn mixed_powi( &self, exp: i32 ) -> Self {
171                return trigonometry::powi( *self, exp as usize );
172            }
173        }
174
175        impl MixedReal for $T
176        {
177            #[inline(always)]
178            fn mixed_max_value() -> Self {
179                return Self::MAX;
180            }
181            #[inline(always)]
182            fn mixed_min_value() -> Self {
183                return Self::MIN;
184            }
185            #[inline(always)]
186            fn mixed_sign( &self) -> Self {
187                return trigonometry::sign(*self);
188            }
189            #[inline(always)]
190            fn mixed_is_positive( &self) -> bool {
191                return true;
192            }
193            #[inline(always)]
194            fn mixed_is_negative( &self) -> bool {
195                return false;
196            }
197        }
198    }
199}
200
201macro_rules! impl_mixed_num_for_fixed_signed{
202    ( $T:ty ) => {
203        impl_mixed_num_for_fixed!($T);
204
205        impl MixedNumSigned  for $T
206        {
207        }
208
209        impl MixedOps for $T
210        {
211        }
212
213        impl MixedAbs for $T
214        {
215            #[inline(always)]
216            fn mixed_abs( &self ) -> Self {
217                return self.abs();
218            }
219        }
220
221        impl MixedPowi for $T
222        {
223            #[inline(always)]
224            fn mixed_powi( &self, exp: i32 ) -> Self {
225                return trigonometry::powi( *self, exp as usize );
226            }
227        }
228
229        impl MixedReal for $T
230        {
231            #[inline(always)]
232            fn mixed_max_value() -> Self {
233                return Self::MAX;
234            }
235            #[inline(always)]
236            fn mixed_min_value() -> Self {
237                return Self::MIN;
238            }
239            #[inline(always)]
240            fn mixed_sign( &self) -> Self {
241                return trigonometry::sign(*self);
242            }
243            #[inline(always)]
244            fn mixed_is_positive( &self) -> bool {
245                return self.is_positive();
246            }
247            #[inline(always)]
248            fn mixed_is_negative( &self) -> bool {
249                return self.is_negative();
250            }
251        }
252
253        impl MixedWrapPhase for $T
254        {
255            #[inline(always)]
256            fn mixed_wrap_phase(&self) -> Self {
257                return trigonometry::wrap_phase(*self);
258            }
259        }
260
261        impl MixedSin for $T
262        {
263            /// Take the sin of self. Implementation varies with type.
264            #[inline(always)]
265            fn mixed_sin(&self) -> Self {
266                return cordic::sin(*self);
267            }
268            #[inline(always)]
269            fn mixed_sincos(&self) -> (Self, Self) 
270                where Self: Sized
271            {
272                return cordic::sin_cos(*self);
273            }
274            /// Take the arcsin of self. Implementation varies with type.
275            #[inline(always)]
276            fn mixed_asin(&self) -> Self {
277                return cordic::asin(*self);
278            }
279        }
280
281        impl MixedCos for $T
282        {
283            /// Take the cos of self. Implementation varies with type.
284            #[inline(always)]
285            fn mixed_cos(&self) -> Self {
286                return cordic::cos(*self);
287            }
288            /// Take the arccos of self. Implementation varies with type.
289            #[inline(always)]
290            fn mixed_acos(&self) -> Self {
291                return cordic::acos(*self);
292            }
293        }
294
295        impl MixedTrigonometry for $T
296        {    
297        }
298
299        impl MixedAtan for $T
300        {
301            /// Take the atan of self. Implementation varies with type.
302            #[inline(always)]
303            fn mixed_atan(&self) -> Self {
304                return cordic::atan(*self);
305            }
306            /// Take the atan of self. Implementation varies with type.
307            #[inline(always)]
308            fn mixed_atan2(&self, other:Self) -> Self {
309                return cordic::atan2(*self, other);
310            }
311            /// Take the atan of self. Implementation varies with type.
312            #[inline(always)]
313            fn mixed_atan2_poly(&self, other:Self) -> Self {
314                return trigonometry::atan::atan2(*self, other);
315            }
316        }
317
318        impl MixedExp for $T
319        {
320            /// Take the exp() of self. Implementation varies with type.
321            #[inline(always)]
322            fn mixed_exp(&self) -> Self {
323                return cordic::exp(*self);
324            }
325        }
326    }
327}
328
329impl_mixed_num_for_fixed_unsigned!(fixed::FixedU8<fixed::types::extra::U0>);
330impl_mixed_num_for_fixed_unsigned!(fixed::FixedU8<fixed::types::extra::U1>);
331impl_mixed_num_for_fixed_unsigned!(fixed::FixedU8<fixed::types::extra::U2>);
332impl_mixed_num_for_fixed_unsigned!(fixed::FixedU8<fixed::types::extra::U3>);
333impl_mixed_num_for_fixed_unsigned!(fixed::FixedU8<fixed::types::extra::U4>);
334impl_mixed_num_for_fixed_unsigned!(fixed::FixedU8<fixed::types::extra::U5>);
335//impl_mixed_num_for_fixed_unsigned!(fixed::FixedU8<fixed::types::extra::U6>);
336//impl_mixed_num_for_fixed_unsigned!(fixed::FixedU8<fixed::types::extra::U7>);
337//impl_mixed_num_for_fixed_unsigned!(fixed::FixedU8<fixed::types::extra::U8>);
338
339impl_mixed_num_for_fixed_signed!(fixed::FixedI8<fixed::types::extra::U0>);
340impl_mixed_num_for_fixed_signed!(fixed::FixedI8<fixed::types::extra::U1>);
341impl_mixed_num_for_fixed_signed!(fixed::FixedI8<fixed::types::extra::U2>);
342impl_mixed_num_for_fixed_signed!(fixed::FixedI8<fixed::types::extra::U3>);
343impl_mixed_num_for_fixed_signed!(fixed::FixedI8<fixed::types::extra::U4>);
344impl_mixed_num_for_fixed_signed!(fixed::FixedI8<fixed::types::extra::U5>);
345//impl_mixed_num_for_fixed_signed!(fixed::FixedI8<fixed::types::extra::U6>);
346//impl_mixed_num_for_fixed_signed!(fixed::FixedI8<fixed::types::extra::U7>);
347//impl_mixed_num_for_fixed_signed!(fixed::FixedI8<fixed::types::extra::U8>);
348
349
350impl_mixed_num_for_fixed_unsigned!(fixed::FixedU16<fixed::types::extra::U0>);
351impl_mixed_num_for_fixed_unsigned!(fixed::FixedU16<fixed::types::extra::U1>);
352impl_mixed_num_for_fixed_unsigned!(fixed::FixedU16<fixed::types::extra::U2>);
353impl_mixed_num_for_fixed_unsigned!(fixed::FixedU16<fixed::types::extra::U3>);
354impl_mixed_num_for_fixed_unsigned!(fixed::FixedU16<fixed::types::extra::U4>);
355impl_mixed_num_for_fixed_unsigned!(fixed::FixedU16<fixed::types::extra::U5>);
356impl_mixed_num_for_fixed_unsigned!(fixed::FixedU16<fixed::types::extra::U6>);
357impl_mixed_num_for_fixed_unsigned!(fixed::FixedU16<fixed::types::extra::U7>);
358impl_mixed_num_for_fixed_unsigned!(fixed::FixedU16<fixed::types::extra::U8>);
359impl_mixed_num_for_fixed_unsigned!(fixed::FixedU16<fixed::types::extra::U9>);
360impl_mixed_num_for_fixed_unsigned!(fixed::FixedU16<fixed::types::extra::U10>);
361impl_mixed_num_for_fixed_unsigned!(fixed::FixedU16<fixed::types::extra::U11>);
362impl_mixed_num_for_fixed_unsigned!(fixed::FixedU16<fixed::types::extra::U12>);
363impl_mixed_num_for_fixed_unsigned!(fixed::FixedU16<fixed::types::extra::U13>);
364//impl_mixed_num_for_fixed_unsigned!(fixed::FixedU16<fixed::types::extra::U14>);
365//impl_mixed_num_for_fixed_unsigned!(fixed::FixedU16<fixed::types::extra::U15>);
366//impl_mixed_num_for_fixed_unsigned!(fixed::FixedU16<fixed::types::extra::U16>);
367
368impl_mixed_num_for_fixed_signed!(fixed::FixedI16<fixed::types::extra::U0>);
369impl_mixed_num_for_fixed_signed!(fixed::FixedI16<fixed::types::extra::U1>);
370impl_mixed_num_for_fixed_signed!(fixed::FixedI16<fixed::types::extra::U2>);
371impl_mixed_num_for_fixed_signed!(fixed::FixedI16<fixed::types::extra::U3>);
372impl_mixed_num_for_fixed_signed!(fixed::FixedI16<fixed::types::extra::U4>);
373impl_mixed_num_for_fixed_signed!(fixed::FixedI16<fixed::types::extra::U5>);
374impl_mixed_num_for_fixed_signed!(fixed::FixedI16<fixed::types::extra::U6>);
375impl_mixed_num_for_fixed_signed!(fixed::FixedI16<fixed::types::extra::U7>);
376impl_mixed_num_for_fixed_signed!(fixed::FixedI16<fixed::types::extra::U8>);
377impl_mixed_num_for_fixed_signed!(fixed::FixedI16<fixed::types::extra::U9>);
378impl_mixed_num_for_fixed_signed!(fixed::FixedI16<fixed::types::extra::U10>);
379impl_mixed_num_for_fixed_signed!(fixed::FixedI16<fixed::types::extra::U11>);
380impl_mixed_num_for_fixed_signed!(fixed::FixedI16<fixed::types::extra::U12>);
381impl_mixed_num_for_fixed_signed!(fixed::FixedI16<fixed::types::extra::U13>);
382//impl_mixed_num_for_fixed_signed!(fixed::FixedI16<fixed::types::extra::U14>);
383//impl_mixed_num_for_fixed_signed!(fixed::FixedI16<fixed::types::extra::U15>);
384//impl_mixed_num_for_fixed_signed!(fixed::FixedI16<fixed::types::extra::U16>);
385
386
387impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U0>);
388impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U1>);
389impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U2>);
390impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U3>);
391impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U4>);
392impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U5>);
393impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U6>);
394impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U7>);
395impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U8>);
396impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U9>);
397impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U10>);
398impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U11>);
399impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U12>);
400impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U13>);
401impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U14>);
402impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U15>);
403impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U16>);
404impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U17>);
405impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U18>);
406impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U19>);
407impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U20>);
408impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U21>);
409impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U22>);
410impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U23>);
411impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U24>);
412impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U25>);
413impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U26>);
414impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U27>);
415impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U28>);
416impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U29>);
417//impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U30>);
418//impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U31>);
419//impl_mixed_num_for_fixed_unsigned!(fixed::FixedU32<fixed::types::extra::U32>);
420
421impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U0>);
422impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U1>);
423impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U2>);
424impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U3>);
425impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U4>);
426impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U5>);
427impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U6>);
428impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U7>);
429impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U8>);
430impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U9>);
431impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U10>);
432impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U11>);
433impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U12>);
434impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U13>);
435impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U14>);
436impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U15>);
437impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U16>);
438impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U17>);
439impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U18>);
440impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U19>);
441impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U20>);
442impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U21>);
443impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U22>);
444impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U23>);
445impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U24>);
446impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U25>);
447impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U26>);
448impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U27>);
449impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U28>);
450impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U29>);
451//impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U30>);
452//impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U31>);
453//impl_mixed_num_for_fixed_signed!(fixed::FixedI32<fixed::types::extra::U32>);
454
455
456impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U0>);
457impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U1>);
458impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U2>);
459impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U3>);
460impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U4>);
461impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U5>);
462impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U6>);
463impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U7>);
464impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U8>);
465impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U9>);
466impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U10>);
467impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U11>);
468impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U12>);
469impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U13>);
470impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U14>);
471impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U15>);
472impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U16>);
473impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U17>);
474impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U18>);
475impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U19>);
476impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U20>);
477impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U21>);
478impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U22>);
479impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U23>);
480impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U24>);
481impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U25>);
482impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U26>);
483impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U27>);
484impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U28>);
485impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U29>);
486impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U30>);
487impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U31>);
488impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U32>);
489impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U33>);
490impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U34>);
491impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U35>);
492impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U36>);
493impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U37>);
494impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U38>);
495impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U39>);
496impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U40>);
497impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U41>);
498impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U42>);
499impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U43>);
500impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U44>);
501impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U45>);
502impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U46>);
503impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U47>);
504impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U48>);
505impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U49>);
506impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U50>);
507impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U51>);
508impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U52>);
509impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U53>);
510impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U54>);
511impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U55>);
512impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U56>);
513impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U57>);
514impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U58>);
515impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U59>);
516impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U60>);
517impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U61>);
518//impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U62>);
519//impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U63>);
520//impl_mixed_num_for_fixed_unsigned!(fixed::FixedU64<fixed::types::extra::U64>);
521
522impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U0>);
523impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U1>);
524impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U2>);
525impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U3>);
526impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U4>);
527impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U5>);
528impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U6>);
529impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U7>);
530impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U8>);
531impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U9>);
532impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U10>);
533impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U11>);
534impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U12>);
535impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U13>);
536impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U14>);
537impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U15>);
538impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U16>);
539impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U17>);
540impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U18>);
541impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U19>);
542impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U20>);
543impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U21>);
544impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U22>);
545impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U23>);
546impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U24>);
547impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U25>);
548impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U26>);
549impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U27>);
550impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U28>);
551impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U29>);
552impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U30>);
553impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U31>);
554impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U32>);
555impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U33>);
556impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U34>);
557impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U35>);
558impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U36>);
559impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U37>);
560impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U38>);
561impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U39>);
562impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U40>);
563impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U41>);
564impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U42>);
565impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U43>);
566impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U44>);
567impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U45>);
568impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U46>);
569impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U47>);
570impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U48>);
571impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U49>);
572impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U50>);
573impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U51>);
574impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U52>);
575impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U53>);
576impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U54>);
577impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U55>);
578impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U56>);
579impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U57>);
580impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U58>);
581impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U59>);
582impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U60>);
583impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U61>);
584//impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U62>);
585//impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U63>);
586//impl_mixed_num_for_fixed_signed!(fixed::FixedI64<fixed::types::extra::U64>);