summaryrefslogtreecommitdiff
path: root/ext/bigdecimal/bigdecimal.h
diff options
context:
space:
mode:
authorshigek <shigek@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-26 13:04:57 +0000
committershigek <shigek@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-26 13:04:57 +0000
commit472efdfeb41af1b2b5376af3f5a5e870f02b7374 (patch)
tree1cd021ce4fcc966968924504193d0e78689c5ea9 /ext/bigdecimal/bigdecimal.h
parent92aee059e87f97b8ea0a56a85196109005702ffe (diff)
0 ** 0 bug fixed.
ROUND_MODE introduced,COMP_MODE removed & round method substantially changed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/bigdecimal/bigdecimal.h')
-rw-r--r--ext/bigdecimal/bigdecimal.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/ext/bigdecimal/bigdecimal.h b/ext/bigdecimal/bigdecimal.h
index 9341c6d..62c89dc 100644
--- a/ext/bigdecimal/bigdecimal.h
+++ b/ext/bigdecimal/bigdecimal.h
@@ -52,12 +52,14 @@ extern "C" {
#define VP_EXCEPTION_MEMORY ((unsigned short)0x0040)
/* Computation mode */
-#define VP_COMP_MODE ((unsigned short)0x0100)
-#define VP_COMP_MODE_TRUNCATE 0
-#define VP_COMP_MODE_ROUNDUP 1
-#define VP_COMP_MODE_CEIL 2
-#define VP_COMP_MODE_FLOOR 3
-#define VP_COMP_MODE_EVEN 4
+#define VP_ROUND_MODE ((unsigned short)0x0100)
+#define VP_ROUND_UP 1
+#define VP_ROUND_DOWN 2
+#define VP_ROUND_HALF_UP 3
+#define VP_ROUND_HALF_DOWN 4
+#define VP_ROUND_CEIL 5
+#define VP_ROUND_FLOOR 6
+#define VP_ROUND_EVEN 7
#define VP_SIGN_NaN 0 /* NaN */
#define VP_SIGN_POSITIVE_ZERO 1 /* Positive zero */
@@ -120,8 +122,8 @@ VP_EXPORT U_LONG VpGetPrecLimit(void);
VP_EXPORT U_LONG VpSetPrecLimit(U_LONG n);
/* Computation mode */
-VP_EXPORT unsigned long VpGetCompMode(void);
-VP_EXPORT unsigned long VpSetCompMode(unsigned long n);
+VP_EXPORT unsigned long VpGetRoundMode(void);
+VP_EXPORT unsigned long VpSetRoundMode(unsigned long n);
VP_EXPORT int VpException(unsigned short f,char *str,int always);
VP_EXPORT int VpIsNegDoubleZero(double v);