forked from SciSharp/NumSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOperator.cs
More file actions
2004 lines (1388 loc) · 96.6 KB
/
Operator.cs
File metadata and controls
2004 lines (1388 loc) · 96.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
namespace NumSharp.Utilities.Maths
{
/// <summary>
/// A class that provides math operations that return the exact expected type according to numpy.
/// </summary>
[SuppressMessage("ReSharper", "UnusedMember.Local")]
[SuppressMessage("ReSharper", "ArrangeTypeMemberModifiers")]
internal class Operator
{
//all other gen
#if _REGEN //We manually fixed types that naturally do not match with casting.
%import "C:\Users\Eli-PC\Desktop\SciSharp\NumSharp\src\NumSharp.Core\bin\Debug\netstandard2.0\NumSharp.Core.dll"
%import NumSharp.np as np
%ops = ["+", "-", "%", "*", "/"]
%names = ["Add", "Subtract", "Mod", "Multiply", "Divide"]
%foreach ops,names%
%foreach supported_numericals,supported_numericals_lowercase%
%foreach supported_numericals,supported_numericals_lowercase%
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static #(np.find_common_type(#101.ToString(), #201.ToString())) #2(#101 lhs, #201 rhs) => lhs #1 rhs;
%
%
%
#else
#endif
//boolean gen
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool Add(bool lhs, bool rhs) => (lhs || rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool Subtract(bool lhs, bool rhs) => ((lhs ? 1 : 0) - (rhs ? 1 : 0)) != 0;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool Multiply(bool lhs, bool rhs) => lhs && rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool Mod(bool lhs, bool rhs) => ((lhs ? 1 : 0) % (rhs ? 1 : 0)) != 0;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool Divide(bool lhs, bool rhs) => lhs && rhs;
//boolean gen
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static int AddBoolean(bool lhs, bool rhs) => (lhs || rhs) ? 1 : 0;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static int SubtractBoolean(bool lhs, bool rhs) => (((lhs ? 1 : 0) - (rhs ? 1 : 0)) != 0) ? 1 : 0;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static int MultiplyBoolean(bool lhs, bool rhs) => (lhs && rhs) ? 1 : 0;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static int ModBoolean(bool lhs, bool rhs) => (((lhs ? 1 : 0) % (rhs ? 1 : 0)) != 0) ? 1 : 0;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static int DivideBoolean(bool lhs, bool rhs) => (lhs && rhs) ? 1 : 0;
#if _REGEN //We manually fixed types that naturally do not match with casting.
%import "C:\Users\Eli-PC\Desktop\SciSharp\NumSharp\src\NumSharp.Core\bin\Debug\netstandard2.0\NumSharp.Core.dll"
%import NumSharp.np as np
%ops = ["+", "-", "%", "*", "/"]
%names = ["Add", "Subtract", "Mod", "Multiply", "Divide"]
//Add, Subtract, Mod, Multiply and Divide Booleanic Operators
//bool is lhs
%foreach ops,names%
%foreach ["Boolean"],["bool"]%
%foreach supported_numericals,supported_numericals_lowercase,supported_numericals_defaultvals,supported_numericals_onevales%
|#rettype = np.find_common_type("#101", "#201")
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static #(rettype) #2(#101 lhs, #201 rhs) => (#(rettype)) ((lhs ? #204 : #203) #1 rhs);
%
%
%
//bool is rhs
%foreach ops,names%
%foreach supported_numericals,supported_numericals_lowercase,supported_numericals_defaultvals,supported_numericals_onevales%
%foreach ["Boolean"],["bool"]%
|#rettype = np.find_common_type("#101", "#201")
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static #(rettype) #2(#101 lhs, #201 rhs) => (#(rettype)) (lhs #1 (rhs ? #104 : #103));
%
%
%
#else
//Add, Subtract, Mod, Multiply and Divide Booleanic Operators
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static byte Add(bool lhs, byte rhs) => (byte) ((lhs ? 1 : 0) + rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static short Add(bool lhs, short rhs) => (short) ((lhs ? 1 : 0) + rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static ushort Add(bool lhs, ushort rhs) => (ushort) ((lhs ? 1 : 0) + rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static int Add(bool lhs, int rhs) => (lhs ? 1 : 0) + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static uint Add(bool lhs, uint rhs) => (lhs ? 1u : 0u) + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static long Add(bool lhs, long rhs) => (lhs ? 1L : 0L) + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static ulong Add(bool lhs, ulong rhs) => (lhs ? 1UL : 0UL) + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static char Add(bool lhs, char rhs) => (char) ((lhs ? 1 : 0) + rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static double Add(bool lhs, double rhs) => (lhs ? 1d : 0d) + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static float Add(bool lhs, float rhs) => (lhs ? 1f : 0f) + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static decimal Add(bool lhs, decimal rhs) => (lhs ? 1m : 0m) + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static byte Subtract(bool lhs, byte rhs) => (byte) ((lhs ? 1 : 0) - rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static short Subtract(bool lhs, short rhs) => (short) ((lhs ? 1 : 0) - rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static ushort Subtract(bool lhs, ushort rhs) => (ushort) ((lhs ? 1 : 0) - rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static int Subtract(bool lhs, int rhs) => (lhs ? 1 : 0) - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static uint Subtract(bool lhs, uint rhs) => (lhs ? 1u : 0u) - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static long Subtract(bool lhs, long rhs) => (lhs ? 1L : 0L) - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static ulong Subtract(bool lhs, ulong rhs) => (lhs ? 1UL : 0UL) - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static char Subtract(bool lhs, char rhs) => (char) ((lhs ? 1 : 0) - rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static double Subtract(bool lhs, double rhs) => (lhs ? 1d : 0d) - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static float Subtract(bool lhs, float rhs) => (lhs ? 1f : 0f) - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static decimal Subtract(bool lhs, decimal rhs) => (lhs ? 1m : 0m) - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static byte Mod(bool lhs, byte rhs) => (byte) ((lhs ? 1 : 0) % rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static short Mod(bool lhs, short rhs) => (short) ((lhs ? 1 : 0) % rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static ushort Mod(bool lhs, ushort rhs) => (ushort) ((lhs ? 1 : 0) % rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static int Mod(bool lhs, int rhs) => (lhs ? 1 : 0) % rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static uint Mod(bool lhs, uint rhs) => (lhs ? 1u : 0u) % rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static long Mod(bool lhs, long rhs) => (lhs ? 1L : 0L) % rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static ulong Mod(bool lhs, ulong rhs) => (lhs ? 1UL : 0UL) % rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static char Mod(bool lhs, char rhs) => (char) ((lhs ? 1 : 0) % rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static double Mod(bool lhs, double rhs) => (lhs ? 1d : 0d) % rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static float Mod(bool lhs, float rhs) => (lhs ? 1f : 0f) % rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static decimal Mod(bool lhs, decimal rhs) => (lhs ? 1m : 0m) % rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static byte Multiply(bool lhs, byte rhs) => (byte) ((lhs ? 1 : 0) * rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static short Multiply(bool lhs, short rhs) => (short) ((lhs ? 1 : 0) * rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static ushort Multiply(bool lhs, ushort rhs) => (ushort) ((lhs ? 1 : 0) * rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static int Multiply(bool lhs, int rhs) => (lhs ? 1 : 0) * rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static uint Multiply(bool lhs, uint rhs) => (lhs ? 1u : 0u) * rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static long Multiply(bool lhs, long rhs) => (lhs ? 1L : 0L) * rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static ulong Multiply(bool lhs, ulong rhs) => (lhs ? 1UL : 0UL) * rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static char Multiply(bool lhs, char rhs) => (char) ((lhs ? 1 : 0) * rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static double Multiply(bool lhs, double rhs) => (lhs ? 1d : 0d) * rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static float Multiply(bool lhs, float rhs) => (lhs ? 1f : 0f) * rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static decimal Multiply(bool lhs, decimal rhs) => (lhs ? 1m : 0m) * rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static byte Divide(bool lhs, byte rhs) => (byte) ((lhs ? 1 : 0) / rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static short Divide(bool lhs, short rhs) => (short) ((lhs ? 1 : 0) / rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static ushort Divide(bool lhs, ushort rhs) => (ushort) ((lhs ? 1 : 0) / rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static int Divide(bool lhs, int rhs) => (lhs ? 1 : 0) / rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static uint Divide(bool lhs, uint rhs) => (lhs ? 1u : 0u) / rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static long Divide(bool lhs, long rhs) => (lhs ? 1L : 0L) / rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static ulong Divide(bool lhs, ulong rhs) => (lhs ? 1UL : 0UL) / rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static char Divide(bool lhs, char rhs) => (char) ((lhs ? 1 : 0) / rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static double Divide(bool lhs, double rhs) => (lhs ? 1d : 0d) / rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static float Divide(bool lhs, float rhs) => (lhs ? 1f : 0f) / rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static decimal Divide(bool lhs, decimal rhs) => (lhs ? 1m : 0m) / rhs;
//bool is rhs
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static byte Add(byte lhs, bool rhs) => (byte) (lhs + (rhs ? 1 : 0));
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static short Add(short lhs, bool rhs) => (short) (lhs + (rhs ? 1 : 0));
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static ushort Add(ushort lhs, bool rhs) => (ushort) (lhs + (rhs ? 1 : 0));
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static int Add(int lhs, bool rhs) => lhs + (rhs ? 1 : 0);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static uint Add(uint lhs, bool rhs) => lhs + (rhs ? 1u : 0u);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static long Add(long lhs, bool rhs) => lhs + (rhs ? 1L : 0L);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static ulong Add(ulong lhs, bool rhs) => lhs + (rhs ? 1UL : 0UL);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static char Add(char lhs, bool rhs) => (char) (lhs + (rhs ? 1 : '\0'));
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static double Add(double lhs, bool rhs) => lhs + (rhs ? 1d : 0d);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static float Add(float lhs, bool rhs) => lhs + (rhs ? 1f : 0f);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static decimal Add(decimal lhs, bool rhs) => lhs + (rhs ? 1m : 0m);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static byte Subtract(byte lhs, bool rhs) => (byte) (lhs - (rhs ? 1 : 0));
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static short Subtract(short lhs, bool rhs) => (short) (lhs - (rhs ? 1 : 0));
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static ushort Subtract(ushort lhs, bool rhs) => (ushort) (lhs - (rhs ? 1 : 0));
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static int Subtract(int lhs, bool rhs) => lhs - (rhs ? 1 : 0);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static uint Subtract(uint lhs, bool rhs) => lhs - (rhs ? 1u : 0u);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static long Subtract(long lhs, bool rhs) => lhs - (rhs ? 1L : 0L);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static ulong Subtract(ulong lhs, bool rhs) => lhs - (rhs ? 1UL : 0UL);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static char Subtract(char lhs, bool rhs) => (char) (lhs - (rhs ? 1 : '\0'));
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static double Subtract(double lhs, bool rhs) => lhs - (rhs ? 1d : 0d);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static float Subtract(float lhs, bool rhs) => lhs - (rhs ? 1f : 0f);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static decimal Subtract(decimal lhs, bool rhs) => lhs - (rhs ? 1m : 0m);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static byte Mod(byte lhs, bool rhs) => (byte) (lhs % (rhs ? 1 : 0));
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static short Mod(short lhs, bool rhs) => (short) (lhs % (rhs ? 1 : 0));
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static ushort Mod(ushort lhs, bool rhs) => (ushort) (lhs % (rhs ? 1 : 0));
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static int Mod(int lhs, bool rhs) => lhs % (rhs ? 1 : 0);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static uint Mod(uint lhs, bool rhs) => lhs % (rhs ? 1u : 0u);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static long Mod(long lhs, bool rhs) => lhs % (rhs ? 1L : 0L);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static ulong Mod(ulong lhs, bool rhs) => lhs % (rhs ? 1UL : 0UL);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static char Mod(char lhs, bool rhs) => (char) (lhs % (rhs ? 1 : '\0'));
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static double Mod(double lhs, bool rhs) => lhs % (rhs ? 1d : 0d);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static float Mod(float lhs, bool rhs) => lhs % (rhs ? 1f : 0f);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static decimal Mod(decimal lhs, bool rhs) => lhs % (rhs ? 1m : 0m);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static byte Multiply(byte lhs, bool rhs) => (byte) (lhs * (rhs ? 1 : 0));
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static short Multiply(short lhs, bool rhs) => (short) (lhs * (rhs ? 1 : 0));
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static ushort Multiply(ushort lhs, bool rhs) => (ushort) (lhs * (rhs ? 1 : 0));
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static int Multiply(int lhs, bool rhs) => lhs * (rhs ? 1 : 0);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static uint Multiply(uint lhs, bool rhs) => lhs * (rhs ? 1u : 0u);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static long Multiply(long lhs, bool rhs) => lhs * (rhs ? 1L : 0L);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static ulong Multiply(ulong lhs, bool rhs) => lhs * (rhs ? 1UL : 0UL);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static char Multiply(char lhs, bool rhs) => (char) (lhs * (rhs ? 1 : '\0'));
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static double Multiply(double lhs, bool rhs) => lhs * (rhs ? 1d : 0d);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static float Multiply(float lhs, bool rhs) => lhs * (rhs ? 1f : 0f);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static decimal Multiply(decimal lhs, bool rhs) => lhs * (rhs ? 1m : 0m);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static byte Divide(byte lhs, bool rhs) => (byte) (lhs / (rhs ? 1 : 0));
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static short Divide(short lhs, bool rhs) => (short) (lhs / (rhs ? 1 : 0));
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static ushort Divide(ushort lhs, bool rhs) => (ushort) (lhs / (rhs ? 1 : 0));
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static int Divide(int lhs, bool rhs) => lhs / (rhs ? 1 : 0);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static uint Divide(uint lhs, bool rhs) => lhs / (rhs ? 1u : 0u);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static long Divide(long lhs, bool rhs) => lhs / (rhs ? 1L : 0L);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static ulong Divide(ulong lhs, bool rhs) => lhs / (rhs ? 1UL : 0UL);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static char Divide(char lhs, bool rhs) => (char) (lhs / (rhs ? 1 : '\0'));
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static double Divide(double lhs, bool rhs) => lhs / (rhs ? 1d : 0d);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static float Divide(float lhs, bool rhs) => lhs / (rhs ? 1f : 0f);
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static decimal Divide(decimal lhs, bool rhs) => lhs / (rhs ? 1m : 0m);
#endif
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static byte Add(byte lhs, byte rhs) => (byte)(lhs + rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static short Add(byte lhs, short rhs) => (short)(lhs + rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ushort Add(byte lhs, ushort rhs) => (ushort)(lhs + rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int Add(byte lhs, int rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static uint Add(byte lhs, uint rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Add(byte lhs, long rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ulong Add(byte lhs, ulong rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static byte Add(byte lhs, char rhs) => (byte)(lhs + rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(byte lhs, double rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static float Add(byte lhs, float rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Add(byte lhs, decimal rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static short Add(short lhs, byte rhs) => (short)(lhs + rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static short Add(short lhs, short rhs) => (short)(lhs + rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int Add(short lhs, ushort rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int Add(short lhs, int rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Add(short lhs, uint rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Add(short lhs, long rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(short lhs, ulong rhs) => lhs + (int)rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static short Add(short lhs, char rhs) => (short)(lhs + rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(short lhs, double rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static float Add(short lhs, float rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Add(short lhs, decimal rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ushort Add(ushort lhs, byte rhs) => (ushort)(lhs + rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int Add(ushort lhs, short rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ushort Add(ushort lhs, ushort rhs) => (ushort)(lhs + rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int Add(ushort lhs, int rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static uint Add(ushort lhs, uint rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Add(ushort lhs, long rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ulong Add(ushort lhs, ulong rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ushort Add(ushort lhs, char rhs) => (ushort)(lhs + rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(ushort lhs, double rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static float Add(ushort lhs, float rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Add(ushort lhs, decimal rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int Add(int lhs, byte rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int Add(int lhs, short rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int Add(int lhs, ushort rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int Add(int lhs, int rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Add(int lhs, uint rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Add(int lhs, long rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(int lhs, ulong rhs) => lhs + (int)rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int Add(int lhs, char rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(int lhs, double rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(int lhs, float rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Add(int lhs, decimal rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static uint Add(uint lhs, byte rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Add(uint lhs, short rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static uint Add(uint lhs, ushort rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Add(uint lhs, int rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static uint Add(uint lhs, uint rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Add(uint lhs, long rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ulong Add(uint lhs, ulong rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static uint Add(uint lhs, char rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(uint lhs, double rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(uint lhs, float rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Add(uint lhs, decimal rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Add(long lhs, byte rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Add(long lhs, short rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Add(long lhs, ushort rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Add(long lhs, int rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Add(long lhs, uint rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Add(long lhs, long rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(long lhs, ulong rhs) => lhs + (long)rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Add(long lhs, char rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(long lhs, double rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(long lhs, float rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Add(long lhs, decimal rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ulong Add(ulong lhs, byte rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(ulong lhs, short rhs) => lhs + (ulong)rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ulong Add(ulong lhs, ushort rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(ulong lhs, int rhs) => lhs + (ulong)rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ulong Add(ulong lhs, uint rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(ulong lhs, long rhs) => lhs + (ulong)rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ulong Add(ulong lhs, ulong rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ulong Add(ulong lhs, char rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(ulong lhs, double rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(ulong lhs, float rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Add(ulong lhs, decimal rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static byte Add(char lhs, byte rhs) => (byte)(lhs + rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static short Add(char lhs, short rhs) => (short)(lhs + rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ushort Add(char lhs, ushort rhs) => (ushort)(lhs + rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int Add(char lhs, int rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static uint Add(char lhs, uint rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Add(char lhs, long rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ulong Add(char lhs, ulong rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static char Add(char lhs, char rhs) => (char)(lhs + rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(char lhs, double rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static float Add(char lhs, float rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Add(char lhs, decimal rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(double lhs, byte rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(double lhs, short rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(double lhs, ushort rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(double lhs, int rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(double lhs, uint rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(double lhs, long rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(double lhs, ulong rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(double lhs, char rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(double lhs, double rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(double lhs, float rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Add(double lhs, decimal rhs) => (decimal)lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static float Add(float lhs, byte rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static float Add(float lhs, short rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static float Add(float lhs, ushort rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(float lhs, int rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(float lhs, uint rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(float lhs, long rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(float lhs, ulong rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static float Add(float lhs, char rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Add(float lhs, double rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static float Add(float lhs, float rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Add(float lhs, decimal rhs) => (decimal)lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Add(decimal lhs, byte rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Add(decimal lhs, short rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Add(decimal lhs, ushort rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Add(decimal lhs, int rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Add(decimal lhs, uint rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Add(decimal lhs, long rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Add(decimal lhs, ulong rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Add(decimal lhs, char rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Add(decimal lhs, double rhs) => lhs + (decimal)rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Add(decimal lhs, float rhs) => lhs + (decimal)rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Add(decimal lhs, decimal rhs) => lhs + rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static byte Subtract(byte lhs, byte rhs) => (byte)(lhs - rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static short Subtract(byte lhs, short rhs) => (short)(lhs - rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ushort Subtract(byte lhs, ushort rhs) => (ushort)(lhs - rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int Subtract(byte lhs, int rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static uint Subtract(byte lhs, uint rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Subtract(byte lhs, long rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ulong Subtract(byte lhs, ulong rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static byte Subtract(byte lhs, char rhs) => (byte)(lhs - rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(byte lhs, double rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static float Subtract(byte lhs, float rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Subtract(byte lhs, decimal rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static short Subtract(short lhs, byte rhs) => (short)(lhs - rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static short Subtract(short lhs, short rhs) => (short)(lhs - rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int Subtract(short lhs, ushort rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int Subtract(short lhs, int rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Subtract(short lhs, uint rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Subtract(short lhs, long rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(short lhs, ulong rhs) => lhs - (int)rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static short Subtract(short lhs, char rhs) => (short)(lhs - rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(short lhs, double rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static float Subtract(short lhs, float rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Subtract(short lhs, decimal rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ushort Subtract(ushort lhs, byte rhs) => (ushort)(lhs - rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int Subtract(ushort lhs, short rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ushort Subtract(ushort lhs, ushort rhs) => (ushort)(lhs - rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int Subtract(ushort lhs, int rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static uint Subtract(ushort lhs, uint rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Subtract(ushort lhs, long rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ulong Subtract(ushort lhs, ulong rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ushort Subtract(ushort lhs, char rhs) => (ushort)(lhs - rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(ushort lhs, double rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static float Subtract(ushort lhs, float rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Subtract(ushort lhs, decimal rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int Subtract(int lhs, byte rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int Subtract(int lhs, short rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int Subtract(int lhs, ushort rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int Subtract(int lhs, int rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Subtract(int lhs, uint rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Subtract(int lhs, long rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(int lhs, ulong rhs) => lhs - (int)rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int Subtract(int lhs, char rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(int lhs, double rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(int lhs, float rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Subtract(int lhs, decimal rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static uint Subtract(uint lhs, byte rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Subtract(uint lhs, short rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static uint Subtract(uint lhs, ushort rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Subtract(uint lhs, int rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static uint Subtract(uint lhs, uint rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Subtract(uint lhs, long rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ulong Subtract(uint lhs, ulong rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static uint Subtract(uint lhs, char rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(uint lhs, double rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(uint lhs, float rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Subtract(uint lhs, decimal rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Subtract(long lhs, byte rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Subtract(long lhs, short rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Subtract(long lhs, ushort rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Subtract(long lhs, int rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Subtract(long lhs, uint rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Subtract(long lhs, long rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(long lhs, ulong rhs) => lhs - (long)rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Subtract(long lhs, char rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(long lhs, double rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(long lhs, float rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Subtract(long lhs, decimal rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ulong Subtract(ulong lhs, byte rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(ulong lhs, short rhs) => lhs - (ulong)rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ulong Subtract(ulong lhs, ushort rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(ulong lhs, int rhs) => lhs - (ulong)rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ulong Subtract(ulong lhs, uint rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(ulong lhs, long rhs) => lhs - (ulong)rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ulong Subtract(ulong lhs, ulong rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ulong Subtract(ulong lhs, char rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(ulong lhs, double rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(ulong lhs, float rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Subtract(ulong lhs, decimal rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static byte Subtract(char lhs, byte rhs) => (byte) (lhs - rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static short Subtract(char lhs, short rhs) => (short) (lhs - rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ushort Subtract(char lhs, ushort rhs) => (ushort) (lhs - rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int Subtract(char lhs, int rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static uint Subtract(char lhs, uint rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Subtract(char lhs, long rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ulong Subtract(char lhs, ulong rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static char Subtract(char lhs, char rhs) => (char) (lhs - rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(char lhs, double rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static float Subtract(char lhs, float rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Subtract(char lhs, decimal rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(double lhs, byte rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(double lhs, short rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(double lhs, ushort rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(double lhs, int rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(double lhs, uint rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(double lhs, long rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(double lhs, ulong rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(double lhs, char rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(double lhs, double rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(double lhs, float rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Subtract(double lhs, decimal rhs) => (decimal)lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static float Subtract(float lhs, byte rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static float Subtract(float lhs, short rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static float Subtract(float lhs, ushort rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(float lhs, int rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(float lhs, uint rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(float lhs, long rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(float lhs, ulong rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static float Subtract(float lhs, char rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Subtract(float lhs, double rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static float Subtract(float lhs, float rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Subtract(float lhs, decimal rhs) => (decimal)lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Subtract(decimal lhs, byte rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Subtract(decimal lhs, short rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Subtract(decimal lhs, ushort rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Subtract(decimal lhs, int rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Subtract(decimal lhs, uint rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Subtract(decimal lhs, long rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Subtract(decimal lhs, ulong rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Subtract(decimal lhs, char rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Subtract(decimal lhs, double rhs) => lhs - (decimal)rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Subtract(decimal lhs, float rhs) => lhs - (decimal)rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Subtract(decimal lhs, decimal rhs) => lhs - rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static byte Mod(byte lhs, byte rhs) => (byte)(lhs % rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static short Mod(byte lhs, short rhs) => (short)(lhs % rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ushort Mod(byte lhs, ushort rhs) => (ushort)(lhs % rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int Mod(byte lhs, int rhs) => lhs % rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static uint Mod(byte lhs, uint rhs) => lhs % rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Mod(byte lhs, long rhs) => lhs % rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ulong Mod(byte lhs, ulong rhs) => lhs % rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static byte Mod(byte lhs, char rhs) => (byte)(lhs % rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Mod(byte lhs, double rhs) => lhs % rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static float Mod(byte lhs, float rhs) => lhs % rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Mod(byte lhs, decimal rhs) => lhs % rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static short Mod(short lhs, byte rhs) => (short)(lhs % rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static short Mod(short lhs, short rhs) => (short)(lhs % rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int Mod(short lhs, ushort rhs) => lhs % rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int Mod(short lhs, int rhs) => lhs % rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Mod(short lhs, uint rhs) => lhs % rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Mod(short lhs, long rhs) => lhs % rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Mod(short lhs, ulong rhs) => lhs % (int)rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static short Mod(short lhs, char rhs) => (short)(lhs % rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double Mod(short lhs, double rhs) => lhs % rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static float Mod(short lhs, float rhs) => lhs % rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal Mod(short lhs, decimal rhs) => lhs % rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ushort Mod(ushort lhs, byte rhs) => (ushort)(lhs % rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int Mod(ushort lhs, short rhs) => lhs % rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ushort Mod(ushort lhs, ushort rhs) => (ushort)(lhs % rhs);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int Mod(ushort lhs, int rhs) => lhs % rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static uint Mod(ushort lhs, uint rhs) => lhs % rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long Mod(ushort lhs, long rhs) => lhs % rhs;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ulong Mod(ushort lhs, ulong rhs) => lhs % rhs;