* CSharp value type System.Decimal
*/
+#include "config.h"
#include <mono/metadata/exception.h>
#include <stdio.h>
#include <memory.h>
#include <string.h>
#include <math.h>
+#ifndef DISABLE_DECIMAL
+
/* needed for building microsoft dll */
#ifdef __GNUC__
#define DECINLINE __inline
#endif
#define LIT_GUINT32(x) x
-#define LIT_GUINT64(x) x##L
+#define LIT_GUINT64(x) x##LL
/* we need a UInt64 type => guint64 */
return pack128toDecimal(pA, alo, ahi, scale, sign);
}
-/**
+/**
+ * mono_string2decimal:
+ * @decimal_repr:
+ * @str:
+ * @decrDecimal:
+ * @sign:
+ *
* converts a digit string to decimal
* The significant digits must be passed as an integer in buf !
*
}
/**
+ * mono_decimal2string:
+ * @
* returns minimal number of digit string to represent decimal
* No leading or trailing zeros !
* Examples:
* pDecPos receives insert position of decimal point relative to start of buffer
* pSign receives sign
*/
-
gint32 mono_decimal2string(/*[In]*/decimal_repr* pA, gint32 digits, gint32 decimals,
MonoArray* pArray, gint32 bufSize, gint32* pDecPos, gint32* pSign)
{
}
/**
+ * mono_decimal2UInt64:
+ * @pA
+ * @pResult
* converts a decimal to an UInt64 without rounding
*/
gint32 mono_decimal2UInt64(/*[In]*/decimal_repr* pA, guint64* pResult)
}
/**
+ * mono_decimal2Int64:
+ * @pA:
+ * pResult:
* converts a decimal to an Int64 without rounding
*/
gint32 mono_decimal2Int64(/*[In]*/decimal_repr* pA, gint64* pResult)
PRECONDITION(sign == 0 || sign == 1);
*p = (((guint64)sign) << 63) | (((guint64)((1023+texp)&0x7ff)) << 52) | mantisse;
+#ifdef ARM_FPU_FPA
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+ {
+ guint32 temp;
+ guint32 *t = (guint32*)p;
+ temp = t [0];
+ t [0] = t [1];
+ t [1] = temp;
+ }
+#endif
+#endif
}
double mono_decimal2double(/*[In]*/decimal_repr* pA)
return DECIMAL_SUCCESS;
}
}
+
+#endif /* DISABLE_DECIMAL */
+