bigdecimal 1.3.0.pre → 1.3.0.pre.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bigdecimal.gemspec +1 -1
- data/ext/bigdecimal/bigdecimal.c +20 -20
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fdcd8a22af29f84d5b2298871bacf1eb0aa04817
|
4
|
+
data.tar.gz: 7afdfb30fb4afb16c1df2cc628bf3d3b6b6e9999
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c071e3278a1a093dba535a87c5653a6f530db3629f0e4cff3328ef71c60f449741c1d2aafda6e0dbc5ad7152c242b349a3cc4106ee9e86383f62bd8ce6c38193
|
7
|
+
data.tar.gz: fe1cd40130e713ed36ba6e54a458df0d231b1699f7264e2aeece544984c827ea115659246ddfa9a2fdf0c01b21bc1d38dea0678f3170f9fcc12b609416963f83
|
data/bigdecimal.gemspec
CHANGED
data/ext/bigdecimal/bigdecimal.c
CHANGED
@@ -4003,26 +4003,6 @@ VpAlloc(size_t mx, const char *szVal)
|
|
4003
4003
|
return vp;
|
4004
4004
|
}
|
4005
4005
|
|
4006
|
-
/* Check on Inf & NaN */
|
4007
|
-
if (StrCmp(szVal, SZ_PINF) == 0 || StrCmp(szVal, SZ_INF) == 0 ) {
|
4008
|
-
vp = VpAllocReal(1);
|
4009
|
-
vp->MaxPrec = 1; /* set max precision */
|
4010
|
-
VpSetPosInf(vp);
|
4011
|
-
return vp;
|
4012
|
-
}
|
4013
|
-
if (StrCmp(szVal, SZ_NINF) == 0) {
|
4014
|
-
vp = VpAllocReal(1);
|
4015
|
-
vp->MaxPrec = 1; /* set max precision */
|
4016
|
-
VpSetNegInf(vp);
|
4017
|
-
return vp;
|
4018
|
-
}
|
4019
|
-
if (StrCmp(szVal, SZ_NaN) == 0) {
|
4020
|
-
vp = VpAllocReal(1);
|
4021
|
-
vp->MaxPrec = 1; /* set max precision */
|
4022
|
-
VpSetNaN(vp);
|
4023
|
-
return vp;
|
4024
|
-
}
|
4025
|
-
|
4026
4006
|
/* Skip all '_' after digit: 2006-6-30 */
|
4027
4007
|
ni = 0;
|
4028
4008
|
buf = rb_str_tmp_new(strlen(szVal) + 1);
|
@@ -4048,6 +4028,26 @@ VpAlloc(size_t mx, const char *szVal)
|
|
4048
4028
|
}
|
4049
4029
|
szVal = psz;
|
4050
4030
|
|
4031
|
+
/* Check on Inf & NaN */
|
4032
|
+
if (StrCmp(szVal, SZ_PINF) == 0 || StrCmp(szVal, SZ_INF) == 0 ) {
|
4033
|
+
vp = VpAllocReal(1);
|
4034
|
+
vp->MaxPrec = 1; /* set max precision */
|
4035
|
+
VpSetPosInf(vp);
|
4036
|
+
return vp;
|
4037
|
+
}
|
4038
|
+
if (StrCmp(szVal, SZ_NINF) == 0) {
|
4039
|
+
vp = VpAllocReal(1);
|
4040
|
+
vp->MaxPrec = 1; /* set max precision */
|
4041
|
+
VpSetNegInf(vp);
|
4042
|
+
return vp;
|
4043
|
+
}
|
4044
|
+
if (StrCmp(szVal, SZ_NaN) == 0) {
|
4045
|
+
vp = VpAllocReal(1);
|
4046
|
+
vp->MaxPrec = 1; /* set max precision */
|
4047
|
+
VpSetNaN(vp);
|
4048
|
+
return vp;
|
4049
|
+
}
|
4050
|
+
|
4051
4051
|
/* check on number szVal[] */
|
4052
4052
|
ipn = i = 0;
|
4053
4053
|
if (szVal[i] == '-') { sign=-1; ++i; }
|