ae_fast_decimal_formatter 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59156225262394ee5540585652a72a196b60845ef06bb64d8409c590f62e535d
|
4
|
+
data.tar.gz: 1dc099b29def36a2f513c6a70d3772ce5df6c48c7a0465ca64e39a300a9dbaa7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d10f701251c18ca9bba7261635a8723370825a4abc5feee17520a7d9fb64d347bd5bf17fcbdd1e0ccd797bc6536895d9e3e7c7df780e41ddca6646d626b7fa4
|
7
|
+
data.tar.gz: 70abf3b82f2e17cf81010fd8538095c041f717e9d3fc4035dffada029c043ca5e106ea716c696a5469df1fbd87cc42a1e27ab771cbaba23c7a7e1a5b958281ff
|
@@ -18,8 +18,13 @@ VALUE c_format_decimal(double num, int precision)
|
|
18
18
|
formatstr[9] = 0;
|
19
19
|
|
20
20
|
if (precision > 0) {
|
21
|
-
rounding_factor =
|
22
|
-
|
21
|
+
rounding_factor = (double) 10.0;
|
22
|
+
for (i = 1; i < precision; i++) { rounding_factor *= (double) 10.0; }
|
23
|
+
|
24
|
+
double multiplied_num = num * (double) 10.0;
|
25
|
+
for (i = 1; i < precision; i++) { multiplied_num *= (double) 10.0; }
|
26
|
+
|
27
|
+
rounded_num = round(multiplied_num) / rounding_factor;
|
23
28
|
} else {
|
24
29
|
rounded_num = round(num);
|
25
30
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ae_fast_decimal_formatter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Appfolio Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Efficiently format decimal number so that reports of millions of decimal
|
14
14
|
cells are fast
|
@@ -26,7 +26,7 @@ licenses:
|
|
26
26
|
- MIT
|
27
27
|
metadata:
|
28
28
|
allowed_push_host: https://rubygems.org
|
29
|
-
post_install_message:
|
29
|
+
post_install_message:
|
30
30
|
rdoc_options: []
|
31
31
|
require_paths:
|
32
32
|
- lib
|
@@ -34,18 +34,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
34
34
|
requirements:
|
35
35
|
- - ">="
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version: 2.
|
37
|
+
version: 2.6.3
|
38
38
|
- - "<"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '3'
|
41
41
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
42
42
|
requirements:
|
43
43
|
- - ">="
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: '0'
|
46
46
|
requirements: []
|
47
|
-
rubygems_version: 3.0.
|
48
|
-
signing_key:
|
47
|
+
rubygems_version: 3.0.8
|
48
|
+
signing_key:
|
49
49
|
specification_version: 4
|
50
50
|
summary: Efficiently format decimal number
|
51
51
|
test_files: []
|