Products Support Documentation Download
rdmbcdapi.h
Go to the documentation of this file.
1 /*
2  * Raima Database Manager
3  *
4  * Copyright (C) 2016 Raims Inc., All rights reserved.
5  *
6  * Use of this software, whether in source code format, or in executable,
7  * binary object code form, is governed by the Raima LICENSE which
8  * is fully described in the LICENSE.TXT file, included within this
9  * distribution of files.
10  */
11 
16 #if !defined(RDMBCDAPI_H_INCLUDED_)
17 #define RDMBCDAPI_H_INCLUDED_
18 
19 #if defined(__cplusplus) && !defined(CPP_HEADER_INCLUDED)
20 #error rdmbcdapi.h is only for C applications. Do not include it directly in C++ applications. Use cpp-rdmbcdapi.h instead
21 #endif
22 
23 #include "rdmbcdtypes.h"
24 #include "rdmretcodetypes.h"
25 
26 #if !defined(RDM_NO_UNICODE)
27 #define rdm_bcdFromString RDM_T_FUNC(rdm_bcdFromString)
28 #define rdm_bcdToString RDM_T_FUNC(rdm_bcdToString)
29 #define rdm_bcdToStringWithScale RDM_T_FUNC(rdm_bcdToStringWithScale)
30 #endif
31 
46 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdAdd (
47  const RDM_BCD_T *operand1,
48  const RDM_BCD_T * operand2,
49  RDM_BCD_ROUNDING_MODE rounding_mode,
50  RDM_BCD_T *result
51  );
52 
59 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdAddDouble (
60  const RDM_BCD_T *operand1,
61  double operand2,
62  RDM_BCD_ROUNDING_MODE rounding_mode,
63  RDM_BCD_T *result
64  );
65 
72 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdAddInt32 (
73  const RDM_BCD_T *operand1,
74  int32_t operand2,
75  RDM_BCD_ROUNDING_MODE rounding_mode,
76  RDM_BCD_T *result
77  );
84 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdAddInt64 (
85  const RDM_BCD_T *operand1,
86  int64_t operand2,
87  RDM_BCD_ROUNDING_MODE rounding_mode,
88  RDM_BCD_T *result
89  );
96 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdAddUInt32 (
97  const RDM_BCD_T *operand1,
98  uint32_t operand2,
99  RDM_BCD_ROUNDING_MODE rounding_mode,
100  RDM_BCD_T *result
101  );
108 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdAddUInt64 (
109  const RDM_BCD_T *operand1,
110  uint64_t operand2,
111  RDM_BCD_ROUNDING_MODE rounding_mode,
112  RDM_BCD_T *result
113  );
114 
121 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdAdjust (
122  RDM_BCD_T * argument,
123  uint8_t precision,
124  uint8_t scale
125  );
126 
133 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdCeiling (
134  const RDM_BCD_T *operand,
135  RDM_BCD_T *result
136  );
137 
144 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdChgSign (
145  const RDM_BCD_T *operand,
146  RDM_BCD_T *result
147  );
148 
158 RDM_EXPORT RDM_COMPARE EXTERNAL_FCN rdm_bcdCompare (
159  const RDM_BCD_T *operand1,
160  const RDM_BCD_T *operand2
161  );
162 
169 RDM_EXPORT void EXTERNAL_FCN rdm_bcdCopy (
170  const RDM_BCD_T *source,
171  RDM_BCD_T *result
172  );
173 
180 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdCos (
181  const RDM_BCD_T *operand,
182  RDM_BCD_ROUNDING_MODE rounding_mode,
183  RDM_BCD_T *result
184  );
191 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdCot (
192  const RDM_BCD_T *operand,
193  RDM_BCD_ROUNDING_MODE rounding_mode,
194  RDM_BCD_T *result
195  );
196 
203 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdCsc (
204  const RDM_BCD_T *operand,
205  RDM_BCD_ROUNDING_MODE rounding_mode,
206  RDM_BCD_T *result
207  );
208 
215 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdDiv (
216  const RDM_BCD_T *operand1,
217  const RDM_BCD_T * operand2,
218  RDM_BCD_ROUNDING_MODE rounding_mode,
219  RDM_BCD_T *result
220  );
221 
228 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdDivByDouble (
229  const RDM_BCD_T *operand1,
230  double operand2,
231  RDM_BCD_ROUNDING_MODE rounding_mode,
232  RDM_BCD_T *result
233  );
234 
241 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdDivByInt32 (
242  const RDM_BCD_T *operand1,
243  int32_t operand2,
244  RDM_BCD_ROUNDING_MODE rounding_mode,
245  RDM_BCD_T *result
246  );
247 
254 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdDivByInt64 (
255  const RDM_BCD_T *operand1,
256  int64_t operand2,
257  RDM_BCD_ROUNDING_MODE rounding_mode,
258  RDM_BCD_T *result
259  );
260 
267 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdDivByUInt32 (
268  const RDM_BCD_T *operand1,
269  uint32_t operand2,
270  RDM_BCD_ROUNDING_MODE rounding_mode,
271  RDM_BCD_T *result
272  );
273 
280 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdDivByUInt64 (
281  const RDM_BCD_T *operand1,
282  uint64_t operand2,
283  RDM_BCD_ROUNDING_MODE rounding_mode,
284  RDM_BCD_T *result
285  );
286 
293 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdDivDouble (
294  double operand1,
295  const RDM_BCD_T * operand2,
296  RDM_BCD_ROUNDING_MODE rounding_mode,
297  RDM_BCD_T *result
298  );
299 
306 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdDivInt32 (
307  int32_t operand1,
308  const RDM_BCD_T * operand2,
309  RDM_BCD_ROUNDING_MODE rounding_mode,
310  RDM_BCD_T *result
311  );
312 
319 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdDivInt64 (
320  int64_t operand1,
321  const RDM_BCD_T * operand2,
322  RDM_BCD_ROUNDING_MODE rounding_mode,
323  RDM_BCD_T *result
324  );
325 
332 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdDivUInt32 (
333  uint32_t operand1,
334  const RDM_BCD_T * operand2,
335  RDM_BCD_ROUNDING_MODE rounding_mode,
336  RDM_BCD_T *result
337  );
338 
345 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdDivUInt64 (
346  uint64_t operand1,
347  const RDM_BCD_T * operand2,
348  RDM_BCD_ROUNDING_MODE rounding_mode,
349  RDM_BCD_T *result
350  );
351 
358 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdExp (
359  const RDM_BCD_T *operand,
360  RDM_BCD_ROUNDING_MODE rounding_mode,
361  RDM_BCD_T *result
362  );
363 
370 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdFloor (
371  const RDM_BCD_T *operand,
372  RDM_BCD_T *result
373  );
374 
381 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdFromDouble (
382  double operand,
383  RDM_BCD_T *result
384  );
385 
392 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdFromFloat (
393  float operand,
394  RDM_BCD_T *result
395  );
396 
403 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdFromInt16 (
404  int16_t operand,
405  RDM_BCD_T *result
406  );
407 
414 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdFromInt32 (
415  int32_t operand,
416  RDM_BCD_T *result
417  );
418 
425 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdFromInt64 (
426  int64_t operand,
427  RDM_BCD_T *result
428  );
429 
436 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdFromInt8 (
437  int8_t operand,
438  RDM_BCD_T *result
439  );
440 
447 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdFromString (
448  const RDM_TCHAR_T *operand,
449  RDM_BCD_T *result
450  );
451 
458 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdFromUInt16 (
459  uint16_t operand,
460  RDM_BCD_T *result
461  );
462 
469 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdFromUInt32 (
470  uint32_t operand,
471  RDM_BCD_T *result
472  );
473 
480 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdFromUInt64 (
481  uint64_t operand,
482  RDM_BCD_T *result
483  );
484 
491 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdFromUInt8 (
492  uint8_t operand,
493  RDM_BCD_T *result
494  );
495 
504 RDM_EXPORT RDM_BOOL_T EXTERNAL_FCN rdm_bcdIsZero (
505  const RDM_BCD_T *argument
506  );
507 
514 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdLog (
515  const RDM_BCD_T *operand,
516  RDM_BCD_ROUNDING_MODE rounding_mode,
517  RDM_BCD_T *result
518  );
519 
526 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdLog10 (
527  const RDM_BCD_T *operand,
528  RDM_BCD_ROUNDING_MODE rounding_mode,
529  RDM_BCD_T *result
530  );
531 
539 RDM_EXPORT uint8_t EXTERNAL_FCN rdm_bcdMaxprec (void);
540 
548 RDM_EXPORT uint8_t EXTERNAL_FCN rdm_bcdMaxscale (void);
549 
556 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdMult (
557  const RDM_BCD_T *operand1,
558  const RDM_BCD_T * operand2,
559  RDM_BCD_ROUNDING_MODE rounding_mode,
560  RDM_BCD_T *result
561  );
562 
569 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdMultDouble (
570  const RDM_BCD_T *operand1,
571  double operand2,
572  RDM_BCD_ROUNDING_MODE rounding_mode,
573  RDM_BCD_T *result
574  );
575 
582 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdMultInt32 (
583  const RDM_BCD_T *operand1,
584  int32_t operand2,
585  RDM_BCD_ROUNDING_MODE rounding_mode,
586  RDM_BCD_T *result
587  );
588 
595 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdMultInt64 (
596  const RDM_BCD_T *operand1,
597  int64_t operand2,
598  RDM_BCD_ROUNDING_MODE rounding_mode,
599  RDM_BCD_T *result
600  );
601 
608 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdMultUInt32 (
609  const RDM_BCD_T *operand1,
610  uint32_t operand2,
611  RDM_BCD_ROUNDING_MODE rounding_mode,
612  RDM_BCD_T *result
613  );
614 
621 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdMultUInt64 (
622  const RDM_BCD_T *operand1,
623  uint64_t operand2,
624  RDM_BCD_ROUNDING_MODE rounding_mode,
625  RDM_BCD_T *result
626  );
627 
634 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdPi (
635  RDM_BCD_ROUNDING_MODE rounding_mode,
636  RDM_BCD_T *pi /***< [out] Pi result value */
637  );
638 
645 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdPow (
646  const RDM_BCD_T *operand1,
647  const RDM_BCD_T * operand2,
648  RDM_BCD_ROUNDING_MODE rounding_mode,
649  RDM_BCD_T *result
650  );
651 
658 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdPowInt32 (
659  const RDM_BCD_T *operand1,
660  int32_t operand2,
661  RDM_BCD_ROUNDING_MODE rounding_mode,
662  RDM_BCD_T *result
663  );
664 
671 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdPowInt64 (
672  const RDM_BCD_T *operand1,
673  int64_t operand2,
674  RDM_BCD_ROUNDING_MODE rounding_mode,
675  RDM_BCD_T *result
676  );
677 
684 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdPowUInt32 (
685  const RDM_BCD_T *operand1,
686  uint32_t operand2,
687  RDM_BCD_ROUNDING_MODE rounding_mode,
688  RDM_BCD_T *result
689  );
690 
697 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdPowUInt64 (
698  const RDM_BCD_T *operand1,
699  uint64_t operand2,
700  RDM_BCD_ROUNDING_MODE rounding_mode,
701  RDM_BCD_T *result
702  );
703 
710 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdReciprocal (
711  const RDM_BCD_T *operand,
712  RDM_BCD_ROUNDING_MODE rounding_mode,
713  RDM_BCD_T *result
714  );
715 
722 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdRound (
723  const RDM_BCD_T *operand,
724  RDM_BCD_T *result
725  );
726 
733 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdSec (
734  const RDM_BCD_T *operand,
735  RDM_BCD_ROUNDING_MODE rounding_mode,
736  RDM_BCD_T *result
737  );
738 
748 RDM_EXPORT int16_t EXTERNAL_FCN rdm_bcdSign (
749  const RDM_BCD_T *argument
750  );
751 
758 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdSin (
759  const RDM_BCD_T *operand,
760  RDM_BCD_ROUNDING_MODE rounding_mode,
761  RDM_BCD_T *result
762  );
763 
770 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdSqrt (
771  const RDM_BCD_T *operand,
772  RDM_BCD_ROUNDING_MODE rounding_mode,
773  RDM_BCD_T *result
774  );
775 
782 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdSub (
783  const RDM_BCD_T *operand1,
784  const RDM_BCD_T * operand2,
785  RDM_BCD_ROUNDING_MODE rounding_mode,
786  RDM_BCD_T *result
787  );
788 
795 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdSubDouble (
796  const RDM_BCD_T *operand1,
797  double operand2,
798  RDM_BCD_ROUNDING_MODE rounding_mode,
799  RDM_BCD_T *result
800  );
801 
808 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdSubFromDouble (
809  double operand1,
810  const RDM_BCD_T * operand2,
811  RDM_BCD_ROUNDING_MODE rounding_mode,
812  RDM_BCD_T *result
813  );
814 
821 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdSubFromInt32 (
822  int32_t operand1,
823  const RDM_BCD_T * operand2,
824  RDM_BCD_ROUNDING_MODE rounding_mode,
825  RDM_BCD_T *result
826  );
827 
834 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdSubFromInt64 (
835  int64_t operand1,
836  const RDM_BCD_T * operand2,
837  RDM_BCD_ROUNDING_MODE rounding_mode,
838  RDM_BCD_T *result
839  );
840 
847 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdSubFromUInt32 (
848  uint32_t operand1,
849  const RDM_BCD_T * operand2,
850  RDM_BCD_ROUNDING_MODE rounding_mode,
851  RDM_BCD_T *result
852  );
853 
860 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdSubFromUInt64 (
861  uint64_t operand1,
862  const RDM_BCD_T * operand2,
863  RDM_BCD_ROUNDING_MODE rounding_mode,
864  RDM_BCD_T *result
865  );
866 
873 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdSubInt32 (
874  const RDM_BCD_T *operand1,
875  int32_t operand2,
876  RDM_BCD_ROUNDING_MODE rounding_mode,
877  RDM_BCD_T *result
878  );
879 
886 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdSubInt64 (
887  const RDM_BCD_T *operand1,
888  int64_t operand2,
889  RDM_BCD_ROUNDING_MODE rounding_mode,
890  RDM_BCD_T *result
891  );
892 
899 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdSubUInt32 (
900  const RDM_BCD_T *operand1,
901  uint32_t operand2,
902  RDM_BCD_ROUNDING_MODE rounding_mode,
903  RDM_BCD_T *result
904  );
905 
912 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdSubUInt64 (
913  const RDM_BCD_T *operand1,
914  uint64_t operand2,
915  RDM_BCD_ROUNDING_MODE rounding_mode,
916  RDM_BCD_T *result
917  );
918 
925 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdTan (
926  const RDM_BCD_T *operand,
927  RDM_BCD_ROUNDING_MODE rounding_mode,
928  RDM_BCD_T *result
929  );
930 
937 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdToDouble (
938  const RDM_BCD_T *operand,
939  double * result
940  );
941 
948 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdToFloat (
949  const RDM_BCD_T *operand,
950  float * result
951  );
952 
959 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdToInt16 (
960  const RDM_BCD_T *operand,
961  int16_t * result
962  );
963 
970 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdToInt32 (
971  const RDM_BCD_T *operand,
972  int32_t * result
973  );
974 
981 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdToInt64 (
982  const RDM_BCD_T *operand,
983  int64_t * result
984  );
985 
992 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdToInt8 (
993  const RDM_BCD_T *operand,
994  int8_t * result
995  );
996 
1006 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdToString (
1007  const RDM_BCD_T *operand,
1008  RDM_BOOL_T useExponent,
1009  RDM_TCHAR_T * result,
1010  size_t inBytes,
1011  size_t *bytesOut
1012  );
1013 
1023 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdToStringWithScale (
1024  const RDM_BCD_T *operand,
1025  uint8_t scale,
1026  RDM_BOOL_T useExponent,
1027  RDM_TCHAR_T *result,
1028  size_t inBytes,
1029  size_t *bytesOut
1030  );
1031 
1038 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdToUInt16 (
1039  const RDM_BCD_T *operand,
1040  uint16_t * result
1041  );
1042 
1049 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdToUInt32 (
1050  const RDM_BCD_T *operand,
1051  uint32_t * result
1052  );
1053 
1060 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdToUInt64 (
1061  const RDM_BCD_T *operand,
1062  uint64_t * result
1063  );
1064 
1071 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_bcdToUInt8 (
1072  const RDM_BCD_T *operand,
1073  uint8_t * result
1074  );
1075 
1078 #endif /* RDMBCDAPI_H_INCLUDED_ */
RDM_RETCODE rdm_bcdCsc(const RDM_BCD_T *operand, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Take the cosecant of a number.
RDM_RETCODE rdm_bcdCeiling(const RDM_BCD_T *operand, RDM_BCD_T *result)
Take the ceiling of a number.
RDM_RETCODE rdm_bcdPowInt64(const RDM_BCD_T *operand1, int64_t operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Take the power of a number.
RDM_RETCODE rdm_bcdToStringWithScale(const RDM_BCD_T *operand, uint8_t scale, RDM_BOOL_T useExponent, RDM_TCHAR_T *result, size_t inBytes, size_t *bytesOut)
Convert a BCD number with scale to a string.
RDM_RETCODE rdm_bcdToDouble(const RDM_BCD_T *operand, double *result)
Convert a BCD number to a double.
RDM_RETCODE rdm_bcdMultUInt64(const RDM_BCD_T *operand1, uint64_t operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Multiply two numbers.
RDM_RETCODE rdm_bcdDivByInt32(const RDM_BCD_T *operand1, int32_t operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Divide two numbers.
RDM_RETCODE rdm_bcdToString(const RDM_BCD_T *operand, RDM_BOOL_T useExponent, RDM_TCHAR_T *result, size_t inBytes, size_t *bytesOut)
Convert a BCD number to a string.
RDM_RETCODE rdm_bcdToUInt32(const RDM_BCD_T *operand, uint32_t *result)
Convert a BCD number to an uint32_t.
RDM_RETCODE rdm_bcdChgSign(const RDM_BCD_T *operand, RDM_BCD_T *result)
Change the sign of a number.
RDM_RETCODE rdm_bcdDivUInt64(uint64_t operand1, const RDM_BCD_T *operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Divide two numbers.
RDM_RETCODE rdm_bcdRound(const RDM_BCD_T *operand, RDM_BCD_T *result)
Find the nearest integer of a BCD number.
RDM_RETCODE rdm_bcdPowUInt32(const RDM_BCD_T *operand1, uint32_t operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Take the power of a number.
RDM_RETCODE rdm_bcdToInt64(const RDM_BCD_T *operand, int64_t *result)
Convert a BCD number to an int64_t.
RDM_BOOL_T
Definition: psptypes.h:62
RDM_RETCODE rdm_bcdSubInt32(const RDM_BCD_T *operand1, int32_t operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Subtract two numbers.
RDM_RETCODE rdm_bcdFromFloat(float operand, RDM_BCD_T *result)
Convert a float to a BCD number.
RDM_RETCODE rdm_bcdMult(const RDM_BCD_T *operand1, const RDM_BCD_T *operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Multiply two numbers.
RDM_RETCODE rdm_bcdSubFromUInt32(uint32_t operand1, const RDM_BCD_T *operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Subtract two numbers.
RDM_RETCODE rdm_bcdToUInt16(const RDM_BCD_T *operand, uint16_t *result)
Convert a BCD number to an uint16_t.
RDM_RETCODE rdm_bcdDivByUInt64(const RDM_BCD_T *operand1, uint64_t operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Divide two numbers.
RDM_RETCODE rdm_bcdFromDouble(double operand, RDM_BCD_T *result)
Convert a double to a BCD number.
uint8_t rdm_bcdMaxprec(void)
Return the maximum precision.
RDM_RETCODE rdm_bcdMultInt32(const RDM_BCD_T *operand1, int32_t operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Multiply two numbers.
RDM_RETCODE rdm_bcdDivDouble(double operand1, const RDM_BCD_T *operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Divide two numbers.
RDM_RETCODE rdm_bcdAddInt64(const RDM_BCD_T *operand1, int64_t operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Add two numbers.
RDM_BCD_ROUNDING_MODE
Rounding modes for RDM BCD.
Definition: rdmbcdtypes.h:25
RDM_RETCODE rdm_bcdFromInt64(int64_t operand, RDM_BCD_T *result)
Convert an int64_t to a BCD number.
RDM_RETCODE rdm_bcdSubFromDouble(double operand1, const RDM_BCD_T *operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Subtract two numbers.
RDM Status and Error Return Codes.
uint8_t rdm_bcdMaxscale(void)
Return the scale.
RDM_RETCODE rdm_bcdToUInt8(const RDM_BCD_T *operand, uint8_t *result)
Convert a BCD number to an uint8_t.
RDM_RETCODE rdm_bcdMultUInt32(const RDM_BCD_T *operand1, uint32_t operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Multiply two numbers.
RDM_RETCODE rdm_bcdSubUInt64(const RDM_BCD_T *operand1, uint64_t operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Subtract two numbers.
RDM_RETCODE rdm_bcdDivInt32(int32_t operand1, const RDM_BCD_T *operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Divide two numbers.
RDM_RETCODE rdm_bcdToInt8(const RDM_BCD_T *operand, int8_t *result)
Convert a BCD number to an int8_t.
RDM_RETCODE rdm_bcdDivByInt64(const RDM_BCD_T *operand1, int64_t operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Divide two numbers.
RDM_RETCODE rdm_bcdSubFromUInt64(uint64_t operand1, const RDM_BCD_T *operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Subtract two numbers.
RDM_RETCODE rdm_bcdAddUInt64(const RDM_BCD_T *operand1, uint64_t operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Add two numbers.
RDM_RETCODE rdm_bcdAdd(const RDM_BCD_T *operand1, const RDM_BCD_T *operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Add two numbers.
RDM_RETCODE rdm_bcdAddInt32(const RDM_BCD_T *operand1, int32_t operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Add two numbers.
RDM_RETCODE rdm_bcdPi(RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *pi)
Pi.
RDM_COMPARE
Definition: psptypes.h:70
RDM_RETCODE rdm_bcdFromUInt16(uint16_t operand, RDM_BCD_T *result)
Convert an uint16_t to a BCD number.
RDM_COMPARE rdm_bcdCompare(const RDM_BCD_T *operand1, const RDM_BCD_T *operand2)
Compare two numbers.
RDM_RETCODE
RDM status and error return codes.
RDM_RETCODE rdm_bcdExp(const RDM_BCD_T *operand, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Take the exponent of a number.
RDM_RETCODE rdm_bcdPowInt32(const RDM_BCD_T *operand1, int32_t operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Take the power of a number.
void rdm_bcdCopy(const RDM_BCD_T *source, RDM_BCD_T *result)
Copy a BCD number.
RDM_RETCODE rdm_bcdAdjust(RDM_BCD_T *argument, uint8_t precision, uint8_t scale)
Adjust a BCD number.
RDM_RETCODE rdm_bcdFromUInt8(uint8_t operand, RDM_BCD_T *result)
Convert an uint8_t to a BCD number.
RDM_RETCODE rdm_bcdMultInt64(const RDM_BCD_T *operand1, int64_t operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Multiply two numbers.
RDM_RETCODE rdm_bcdFromInt32(int32_t operand, RDM_BCD_T *result)
Convert an int32_t to a BCD number.
RDM_RETCODE rdm_bcdDivUInt32(uint32_t operand1, const RDM_BCD_T *operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Divide two numbers.
RDM_RETCODE rdm_bcdCot(const RDM_BCD_T *operand, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Take the cotangent of a number.
RDM_RETCODE rdm_bcdTan(const RDM_BCD_T *operand, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Take the tangent of a number.
RDM_RETCODE rdm_bcdDivByUInt32(const RDM_BCD_T *operand1, uint32_t operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Divide two numbers.
RDM_RETCODE rdm_bcdFromUInt64(uint64_t operand, RDM_BCD_T *result)
Convert an uint64_t to a BCD number.
RDM_RETCODE rdm_bcdFromInt16(int16_t operand, RDM_BCD_T *result)
Convert an int16_t to a BCD number.
RDM_RETCODE rdm_bcdDiv(const RDM_BCD_T *operand1, const RDM_BCD_T *operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Divide two numbers.
RDM_RETCODE rdm_bcdLog(const RDM_BCD_T *operand, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Take the natual logarithm of a number.
RDM_RETCODE rdm_bcdFromString(const RDM_TCHAR_T *operand, RDM_BCD_T *result)
Convert a string to a BCD number.
RDM_RETCODE rdm_bcdSin(const RDM_BCD_T *operand, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Take the sine of a number.
RDM_BOOL_T rdm_bcdIsZero(const RDM_BCD_T *argument)
Is a number zero.
RDM_RETCODE rdm_bcdFromInt8(int8_t operand, RDM_BCD_T *result)
Convert an int8_t to a BCD number.
RDM_RETCODE rdm_bcdSec(const RDM_BCD_T *operand, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Take the secant of a number.
RDM_RETCODE rdm_bcdSqrt(const RDM_BCD_T *operand, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Take the square root of a number.
RDM_RETCODE rdm_bcdToInt32(const RDM_BCD_T *operand, int32_t *result)
Convert a BCD number to an int32_t.
Header for Binary-coded decimal (BCD) types.
RDM_RETCODE rdm_bcdDivInt64(int64_t operand1, const RDM_BCD_T *operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Divide two numbers.
RDM_RETCODE rdm_bcdMultDouble(const RDM_BCD_T *operand1, double operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Multiply two numbers.
int16_t rdm_bcdSign(const RDM_BCD_T *argument)
Get the sign of a number.
RDM_RETCODE rdm_bcdFloor(const RDM_BCD_T *operand, RDM_BCD_T *result)
Take the floor of a number.
RDM_RETCODE rdm_bcdReciprocal(const RDM_BCD_T *operand, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Take the reciprocal of a number.
RDM_RETCODE rdm_bcdAddUInt32(const RDM_BCD_T *operand1, uint32_t operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Add two numbers.
RDM_RETCODE rdm_bcdPow(const RDM_BCD_T *operand1, const RDM_BCD_T *operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Take the power of a number.
RDM_RETCODE rdm_bcdSubInt64(const RDM_BCD_T *operand1, int64_t operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Subtract two numbers.
RDM_RETCODE rdm_bcdLog10(const RDM_BCD_T *operand, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Take the logarithm base 10 of a number.
RDM_RETCODE rdm_bcdCos(const RDM_BCD_T *operand, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Take the cosine of a number.
RDM_RETCODE rdm_bcdSub(const RDM_BCD_T *operand1, const RDM_BCD_T *operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Subtract two numbers.
RDM_RETCODE rdm_bcdToFloat(const RDM_BCD_T *operand, float *result)
Convert a BCD number to a float.
#define RDM_TCHAR_T
Definition: psptypes.h:134
RDM_RETCODE rdm_bcdPowUInt64(const RDM_BCD_T *operand1, uint64_t operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Take the power of a number.
RDM_RETCODE rdm_bcdSubDouble(const RDM_BCD_T *operand1, double operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Subtract two numbers.
RDM_RETCODE rdm_bcdDivByDouble(const RDM_BCD_T *operand1, double operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Divide two numbers.
RDM_RETCODE rdm_bcdSubFromInt64(int64_t operand1, const RDM_BCD_T *operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Subtract two numbers.
RDM_RETCODE rdm_bcdToUInt64(const RDM_BCD_T *operand, uint64_t *result)
Convert a BCD number to an uint64_t.
RDM_RETCODE rdm_bcdSubUInt32(const RDM_BCD_T *operand1, uint32_t operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Subtract two numbers.
The RDM Binary Coded Decimal (BCD) data structure.
Definition: rdmbcdtypes.h:41
RDM_RETCODE rdm_bcdAddDouble(const RDM_BCD_T *operand1, double operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Add two numbers.
RDM_RETCODE rdm_bcdSubFromInt32(int32_t operand1, const RDM_BCD_T *operand2, RDM_BCD_ROUNDING_MODE rounding_mode, RDM_BCD_T *result)
Subtract two numbers.
RDM_RETCODE rdm_bcdFromUInt32(uint32_t operand, RDM_BCD_T *result)
Convert an uint32_t to a BCD number.
RDM_RETCODE rdm_bcdToInt16(const RDM_BCD_T *operand, int16_t *result)
Convert a BCD number to an int16_t.