Mock Version: 2.6 Mock Version: 2.6 Mock Version: 2.6 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target aarch64 --nodeps /builddir/build/SPECS/R-readr.spec'], chrootPath='/var/lib/mock/f33-build-23262085-2225193/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=201600uid=1000gid=425user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target aarch64 --nodeps /builddir/build/SPECS/R-readr.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: aarch64 Building for target aarch64 setting SOURCE_DATE_EPOCH=1602115200 Wrote: /builddir/build/SRPMS/R-readr-1.4.0-1.fc33.src.rpm Child return code was: 0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target aarch64 --nodeps /builddir/build/SPECS/R-readr.spec'], chrootPath='/var/lib/mock/f33-build-23262085-2225193/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=201600uid=1000gid=425user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target aarch64 --nodeps /builddir/build/SPECS/R-readr.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: aarch64 Building for target aarch64 setting SOURCE_DATE_EPOCH=1602115200 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.bJejwT + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf readr + /usr/bin/mkdir -p readr + cd readr + /usr/bin/gzip -dc /builddir/build/SOURCES/readr_1.4.0.tar.gz + /usr/bin/tar -xof - + STATUS=0 + '[' 0 -ne 0 ']' + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + sed -i 's/covr, //g' readr/DESCRIPTION + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.hufHBU + umask 022 + cd /builddir/build/BUILD + cd readr + RPM_EC=0 ++ jobs -p + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.qMbWkV + umask 022 + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/R-readr-1.4.0-1.fc33.aarch64 '!=' / ']' + rm -rf /builddir/build/BUILDROOT/R-readr-1.4.0-1.fc33.aarch64 ++ dirname /builddir/build/BUILDROOT/R-readr-1.4.0-1.fc33.aarch64 + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/R-readr-1.4.0-1.fc33.aarch64 + cd readr + mkdir -p /builddir/build/BUILDROOT/R-readr-1.4.0-1.fc33.aarch64/usr/lib64/R/library + /usr/bin/R CMD INSTALL -l /builddir/build/BUILDROOT/R-readr-1.4.0-1.fc33.aarch64/usr/lib64/R/library readr * installing *source* package 'readr' ... file 'DESCRIPTION' has the wrong MD5 checksum ** using staged installation ** libs g++ -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I'/usr/share/R/library/BH/include' -I'/usr/share/R/library/cpp11/include' -I/usr/local/include -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -c Collector.cpp -o Collector.o g++ -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I'/usr/share/R/library/BH/include' -I'/usr/share/R/library/cpp11/include' -I/usr/local/include -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -c CollectorGuess.cpp -o CollectorGuess.o g++ -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I'/usr/share/R/library/BH/include' -I'/usr/share/R/library/cpp11/include' -I/usr/local/include -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -c Iconv.cpp -o Iconv.o g++ -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I'/usr/share/R/library/BH/include' -I'/usr/share/R/library/cpp11/include' -I/usr/local/include -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -c LocaleInfo.cpp -o LocaleInfo.o g++ -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I'/usr/share/R/library/BH/include' -I'/usr/share/R/library/cpp11/include' -I/usr/local/include -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -c Reader.cpp -o Reader.o g++ -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I'/usr/share/R/library/BH/include' -I'/usr/share/R/library/cpp11/include' -I/usr/local/include -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -c Source.cpp -o Source.o In file included from /usr/share/R/library/BH/include/boost/mpl/aux_/na_assert.hpp:23, from /usr/share/R/library/BH/include/boost/mpl/arg.hpp:25, from /usr/share/R/library/BH/include/boost/mpl/placeholders.hpp:24, from /usr/share/R/library/BH/include/boost/iterator/iterator_categories.hpp:16, from /usr/share/R/library/BH/include/boost/iterator/iterator_concepts.hpp:10, from /usr/share/R/library/BH/include/boost/range/concepts.hpp:20, from /usr/share/R/library/BH/include/boost/range/algorithm/equal.hpp:14, from utils.h:6, from Source.h:5, from Source.cpp:4: /usr/share/R/library/BH/include/boost/mpl/assert.hpp:194:21: warning: unnecessary parentheses in declaration of 'assert_arg' [-Wparentheses] 194 | failed ************ (Pred::************ | ^ /usr/share/R/library/BH/include/boost/mpl/assert.hpp:199:21: warning: unnecessary parentheses in declaration of 'assert_not_arg' [-Wparentheses] 199 | failed ************ (boost::mpl::not_::************ | ^ g++ -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I'/usr/share/R/library/BH/include' -I'/usr/share/R/library/cpp11/include' -I/usr/local/include -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -c Tokenizer.cpp -o Tokenizer.o g++ -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I'/usr/share/R/library/BH/include' -I'/usr/share/R/library/cpp11/include' -I/usr/local/include -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -c TokenizerDelim.cpp -o TokenizerDelim.o In file included from /usr/share/R/library/BH/include/boost/mpl/aux_/na_assert.hpp:23, from /usr/share/R/library/BH/include/boost/mpl/arg.hpp:25, from /usr/share/R/library/BH/include/boost/mpl/placeholders.hpp:24, from /usr/share/R/library/BH/include/boost/iterator/iterator_categories.hpp:16, from /usr/share/R/library/BH/include/boost/iterator/iterator_concepts.hpp:10, from /usr/share/R/library/BH/include/boost/range/concepts.hpp:20, from /usr/share/R/library/BH/include/boost/range/algorithm/equal.hpp:14, from utils.h:6, from Source.h:5, from Token.h:7, from TokenizerDelim.h:5, from TokenizerDelim.cpp:1: /usr/share/R/library/BH/include/boost/mpl/assert.hpp:194:21: warning: unnecessary parentheses in declaration of 'assert_arg' [-Wparentheses] 194 | failed ************ (Pred::************ | ^ /usr/share/R/library/BH/include/boost/mpl/assert.hpp:199:21: warning: unnecessary parentheses in declaration of 'assert_not_arg' [-Wparentheses] 199 | failed ************ (boost::mpl::not_::************ | ^ g++ -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I'/usr/share/R/library/BH/include' -I'/usr/share/R/library/cpp11/include' -I/usr/local/include -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -c TokenizerFwf.cpp -o TokenizerFwf.o g++ -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I'/usr/share/R/library/BH/include' -I'/usr/share/R/library/cpp11/include' -I/usr/local/include -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -c TokenizerWs.cpp -o TokenizerWs.o g++ -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I'/usr/share/R/library/BH/include' -I'/usr/share/R/library/cpp11/include' -I/usr/local/include -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -c connection.cpp -o connection.o g++ -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I'/usr/share/R/library/BH/include' -I'/usr/share/R/library/cpp11/include' -I/usr/local/include -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -c cpp11.cpp -o cpp11.o g++ -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I'/usr/share/R/library/BH/include' -I'/usr/share/R/library/cpp11/include' -I/usr/local/include -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -c datetime.cpp -o datetime.o gcc -I"/usr/include/R" -DNDEBUG -I'/usr/share/R/library/BH/include' -I'/usr/share/R/library/cpp11/include' -I/usr/local/include -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -c grisu3.c -o grisu3.o grisu3.c: In function 'double2diy_fp': grisu3.c:57:23: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] 57 | #define CAST_U64(d) (*(uint64_t*)&d) | ^~~~~~~~~~~~~~ 58 | #define MIN(x,y) ((x) <= (y) ? (x) : (y)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 59 | #define MAX(x,y) ((x) >= (y) ? (x) : (y)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 60 | | 61 | #define MIN_CACHED_EXP -348 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 62 | #define CACHED_EXP_STEP 8 | ~~~~~~~~~~~~~~~~~~~~~~~~~ 63 | | 64 | typedef struct diy_fp | ~~~~~~~~~~~~~~~~~~~~~ 65 | { | ~ 66 | uint64_t f; | ~~~~~~~~~~~ 67 | int e; | ~~~~~~ 68 | } diy_fp; | ~~~~~~~~~ 69 | | 70 | typedef struct power | ~~~~~~~~~~~~~~~~~~~~ 71 | { | ~ 72 | uint64_t fract; | ~~~~~~~~~~~~~~~ 73 | int16_t b_exp, d_exp; | ~~~~~~~~~~~~~~~~~~~~~ 74 | } power; | ~~~~~~~~ 75 | | 76 | static const power pow_cache[] = | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 77 | { | ~ 78 | { 0xfa8fd5a0081c0288ULL, -1220, -348 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 79 | { 0xbaaee17fa23ebf76ULL, -1193, -340 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 80 | { 0x8b16fb203055ac76ULL, -1166, -332 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 81 | { 0xcf42894a5dce35eaULL, -1140, -324 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 82 | { 0x9a6bb0aa55653b2dULL, -1113, -316 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 83 | { 0xe61acf033d1a45dfULL, -1087, -308 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 84 | { 0xab70fe17c79ac6caULL, -1060, -300 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 85 | { 0xff77b1fcbebcdc4fULL, -1034, -292 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 86 | { 0xbe5691ef416bd60cULL, -1007, -284 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 87 | { 0x8dd01fad907ffc3cULL, -980, -276 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 88 | { 0xd3515c2831559a83ULL, -954, -268 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 89 | { 0x9d71ac8fada6c9b5ULL, -927, -260 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 90 | { 0xea9c227723ee8bcbULL, -901, -252 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 91 | { 0xaecc49914078536dULL, -874, -244 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 92 | { 0x823c12795db6ce57ULL, -847, -236 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 93 | { 0xc21094364dfb5637ULL, -821, -228 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 94 | { 0x9096ea6f3848984fULL, -794, -220 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 95 | { 0xd77485cb25823ac7ULL, -768, -212 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 96 | { 0xa086cfcd97bf97f4ULL, -741, -204 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 97 | { 0xef340a98172aace5ULL, -715, -196 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 98 | { 0xb23867fb2a35b28eULL, -688, -188 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 99 | { 0x84c8d4dfd2c63f3bULL, -661, -180 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 100 | { 0xc5dd44271ad3cdbaULL, -635, -172 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 101 | { 0x936b9fcebb25c996ULL, -608, -164 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 102 | { 0xdbac6c247d62a584ULL, -582, -156 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 103 | { 0xa3ab66580d5fdaf6ULL, -555, -148 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 104 | { 0xf3e2f893dec3f126ULL, -529, -140 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 105 | { 0xb5b5ada8aaff80b8ULL, -502, -132 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 106 | { 0x87625f056c7c4a8bULL, -475, -124 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 107 | { 0xc9bcff6034c13053ULL, -449, -116 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 108 | { 0x964e858c91ba2655ULL, -422, -108 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 109 | { 0xdff9772470297ebdULL, -396, -100 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 110 | { 0xa6dfbd9fb8e5b88fULL, -369, -92 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 111 | { 0xf8a95fcf88747d94ULL, -343, -84 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 112 | { 0xb94470938fa89bcfULL, -316, -76 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 113 | { 0x8a08f0f8bf0f156bULL, -289, -68 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 114 | { 0xcdb02555653131b6ULL, -263, -60 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 115 | { 0x993fe2c6d07b7facULL, -236, -52 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | { 0xe45c10c42a2b3b06ULL, -210, -44 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 117 | { 0xaa242499697392d3ULL, -183, -36 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 118 | { 0xfd87b5f28300ca0eULL, -157, -28 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 119 | { 0xbce5086492111aebULL, -130, -20 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 120 | { 0x8cbccc096f5088ccULL, -103, -12 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 121 | { 0xd1b71758e219652cULL, -77, -4 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 122 | { 0x9c40000000000000ULL, -50, 4 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 123 | { 0xe8d4a51000000000ULL, -24, 12 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 124 | { 0xad78ebc5ac620000ULL, 3, 20 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 125 | { 0x813f3978f8940984ULL, 30, 28 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 126 | { 0xc097ce7bc90715b3ULL, 56, 36 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 127 | { 0x8f7e32ce7bea5c70ULL, 83, 44 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 128 | { 0xd5d238a4abe98068ULL, 109, 52 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 129 | { 0x9f4f2726179a2245ULL, 136, 60 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 130 | { 0xed63a231d4c4fb27ULL, 162, 68 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 131 | { 0xb0de65388cc8ada8ULL, 189, 76 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 132 | { 0x83c7088e1aab65dbULL, 216, 84 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 133 | { 0xc45d1df942711d9aULL, 242, 92 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 134 | { 0x924d692ca61be758ULL, 269, 100 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 135 | { 0xda01ee641a708deaULL, 295, 108 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 136 | { 0xa26da3999aef774aULL, 322, 116 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 137 | { 0xf209787bb47d6b85ULL, 348, 124 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 138 | { 0xb454e4a179dd1877ULL, 375, 132 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 139 | { 0x865b86925b9bc5c2ULL, 402, 140 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 140 | { 0xc83553c5c8965d3dULL, 428, 148 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 141 | { 0x952ab45cfa97a0b3ULL, 455, 156 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 142 | { 0xde469fbd99a05fe3ULL, 481, 164 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 143 | { 0xa59bc234db398c25ULL, 508, 172 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 144 | { 0xf6c69a72a3989f5cULL, 534, 180 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 145 | { 0xb7dcbf5354e9beceULL, 561, 188 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 146 | { 0x88fcf317f22241e2ULL, 588, 196 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 147 | { 0xcc20ce9bd35c78a5ULL, 614, 204 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 148 | { 0x98165af37b2153dfULL, 641, 212 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 149 | { 0xe2a0b5dc971f303aULL, 667, 220 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 150 | { 0xa8d9d1535ce3b396ULL, 694, 228 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 151 | { 0xfb9b7cd9a4a7443cULL, 720, 236 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 152 | { 0xbb764c4ca7a44410ULL, 747, 244 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 153 | { 0x8bab8eefb6409c1aULL, 774, 252 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 154 | { 0xd01fef10a657842cULL, 800, 260 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 155 | { 0x9b10a4e5e9913129ULL, 827, 268 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 156 | { 0xe7109bfba19c0c9dULL, 853, 276 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 157 | { 0xac2820d9623bf429ULL, 880, 284 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 158 | { 0x80444b5e7aa7cf85ULL, 907, 292 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 159 | { 0xbf21e44003acdd2dULL, 933, 300 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 160 | { 0x8e679c2f5e44ff8fULL, 960, 308 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 161 | { 0xd433179d9c8cb841ULL, 986, 316 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 162 | { 0x9e19db92b4e31ba9ULL, 1013, 324 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 163 | { 0xeb96bf6ebadf77d9ULL, 1039, 332 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 164 | { 0xaf87023b9bf0ee6bULL, 1066, 340 } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 165 | }; | ~~ 166 | | 167 | static int cached_pow(int exp, diy_fp *p) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 168 | { | ~ 169 | int k = (int)ceil((exp+DIYFP_FRACT_SIZE-1) * D_1_LOG2_10); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 170 | int i = (k-MIN_CACHED_EXP-1) / CACHED_EXP_STEP + 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 171 | p->f = pow_cache[i].fract; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 172 | p->e = pow_cache[i].b_exp; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 173 | return pow_cache[i].d_exp; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 174 | } | ~ 175 | | 176 | static diy_fp minus(diy_fp x, diy_fp y) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 177 | { | ~ 178 | diy_fp d; d.f = x.f - y.f; d.e = x.e; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 179 | assert(x.e == y.e && x.f >= y.f); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 180 | return d; | ~~~~~~~~~ 181 | } | ~ 182 | | 183 | static diy_fp multiply(diy_fp x, diy_fp y) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 184 | { | ~ 185 | uint64_t a, b, c, d, ac, bc, ad, bd, tmp; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 186 | diy_fp r; | ~~~~~~~~~ 187 | a = x.f >> 32; b = x.f & MASK32; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 188 | c = y.f >> 32; d = y.f & MASK32; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 189 | ac = a*c; bc = b*c; | ~~~~~~~~~~~~~~~~~~~ 190 | ad = a*d; bd = b*d; | ~~~~~~~~~~~~~~~~~~~ 191 | tmp = (bd >> 32) + (ad & MASK32) + (bc & MASK32); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 192 | tmp += 1U << 31; // round | ~~~~~~~~~~~~~~~~~~~~~~~~~ 193 | r.f = ac + (ad >> 32) + (bc >> 32) + (tmp >> 32); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 194 | r.e = x.e + y.e + 64; | ~~~~~~~~~~~~~~~~~~~~~ 195 | return r; | ~~~~~~~~~ 196 | } | ~ 197 | | 198 | static diy_fp normalize_diy_fp(diy_fp n) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 199 | { | ~ 200 | assert(n.f != 0); | ~~~~~~~~~~~~~~~~~ 201 | while(!(n.f & 0xFFC0000000000000ULL)) { n.f <<= 10; n.e -= 10; } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 202 | while(!(n.f & D64_SIGN)) { n.f <<= 1; --n.e; } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 203 | return n; | ~~~~~~~~~ 204 | } | ~ 205 | | 206 | static diy_fp double2diy_fp(double d) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 207 | { | ~ 208 | diy_fp fp; | ~~~~~~~~~~ 209 | uint64_t u64 = CAST_U64(d); | ~~~~~~~~~~~~~~~~~~~~~~~~~ grisu3.c:209:17: note: in expansion of macro 'CAST_U64' 209 | uint64_t u64 = CAST_U64(d); | ^~~~~~~~ grisu3.c: In function 'grisu3': grisu3.c:57:23: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] 57 | #define CAST_U64(d) (*(uint64_t*)&d) | ^~~~~~~~~~~~~~ 58 | #define MIN(x,y) ((x) <= (y) ? (x) : (y)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 59 | #define MAX(x,y) ((x) >= (y) ? (x) : (y)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 60 | | 61 | #define MIN_CACHED_EXP -348 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 62 | #define CACHED_EXP_STEP 8 | ~~~~~~~~~~~~~~~~~~~~~~~~~ 63 | | 64 | typedef struct diy_fp | ~~~~~~~~~~~~~~~~~~~~~ 65 | { | ~ 66 | uint64_t f; | ~~~~~~~~~~~ 67 | int e; | ~~~~~~ 68 | } diy_fp; | ~~~~~~~~~ 69 | | 70 | typedef struct power | ~~~~~~~~~~~~~~~~~~~~ 71 | { | ~ 72 | uint64_t fract; | ~~~~~~~~~~~~~~~ 73 | int16_t b_exp, d_exp; | ~~~~~~~~~~~~~~~~~~~~~ 74 | } power; | ~~~~~~~~ 75 | | 76 | static const power pow_cache[] = | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 77 | { | ~ 78 | { 0xfa8fd5a0081c0288ULL, -1220, -348 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 79 | { 0xbaaee17fa23ebf76ULL, -1193, -340 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 80 | { 0x8b16fb203055ac76ULL, -1166, -332 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 81 | { 0xcf42894a5dce35eaULL, -1140, -324 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 82 | { 0x9a6bb0aa55653b2dULL, -1113, -316 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 83 | { 0xe61acf033d1a45dfULL, -1087, -308 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 84 | { 0xab70fe17c79ac6caULL, -1060, -300 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 85 | { 0xff77b1fcbebcdc4fULL, -1034, -292 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 86 | { 0xbe5691ef416bd60cULL, -1007, -284 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 87 | { 0x8dd01fad907ffc3cULL, -980, -276 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 88 | { 0xd3515c2831559a83ULL, -954, -268 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 89 | { 0x9d71ac8fada6c9b5ULL, -927, -260 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 90 | { 0xea9c227723ee8bcbULL, -901, -252 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 91 | { 0xaecc49914078536dULL, -874, -244 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 92 | { 0x823c12795db6ce57ULL, -847, -236 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 93 | { 0xc21094364dfb5637ULL, -821, -228 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 94 | { 0x9096ea6f3848984fULL, -794, -220 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 95 | { 0xd77485cb25823ac7ULL, -768, -212 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 96 | { 0xa086cfcd97bf97f4ULL, -741, -204 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 97 | { 0xef340a98172aace5ULL, -715, -196 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 98 | { 0xb23867fb2a35b28eULL, -688, -188 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 99 | { 0x84c8d4dfd2c63f3bULL, -661, -180 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 100 | { 0xc5dd44271ad3cdbaULL, -635, -172 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 101 | { 0x936b9fcebb25c996ULL, -608, -164 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 102 | { 0xdbac6c247d62a584ULL, -582, -156 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 103 | { 0xa3ab66580d5fdaf6ULL, -555, -148 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 104 | { 0xf3e2f893dec3f126ULL, -529, -140 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 105 | { 0xb5b5ada8aaff80b8ULL, -502, -132 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 106 | { 0x87625f056c7c4a8bULL, -475, -124 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 107 | { 0xc9bcff6034c13053ULL, -449, -116 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 108 | { 0x964e858c91ba2655ULL, -422, -108 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 109 | { 0xdff9772470297ebdULL, -396, -100 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 110 | { 0xa6dfbd9fb8e5b88fULL, -369, -92 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 111 | { 0xf8a95fcf88747d94ULL, -343, -84 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 112 | { 0xb94470938fa89bcfULL, -316, -76 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 113 | { 0x8a08f0f8bf0f156bULL, -289, -68 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 114 | { 0xcdb02555653131b6ULL, -263, -60 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 115 | { 0x993fe2c6d07b7facULL, -236, -52 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | { 0xe45c10c42a2b3b06ULL, -210, -44 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 117 | { 0xaa242499697392d3ULL, -183, -36 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 118 | { 0xfd87b5f28300ca0eULL, -157, -28 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 119 | { 0xbce5086492111aebULL, -130, -20 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 120 | { 0x8cbccc096f5088ccULL, -103, -12 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 121 | { 0xd1b71758e219652cULL, -77, -4 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 122 | { 0x9c40000000000000ULL, -50, 4 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 123 | { 0xe8d4a51000000000ULL, -24, 12 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 124 | { 0xad78ebc5ac620000ULL, 3, 20 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 125 | { 0x813f3978f8940984ULL, 30, 28 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 126 | { 0xc097ce7bc90715b3ULL, 56, 36 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 127 | { 0x8f7e32ce7bea5c70ULL, 83, 44 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 128 | { 0xd5d238a4abe98068ULL, 109, 52 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 129 | { 0x9f4f2726179a2245ULL, 136, 60 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 130 | { 0xed63a231d4c4fb27ULL, 162, 68 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 131 | { 0xb0de65388cc8ada8ULL, 189, 76 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 132 | { 0x83c7088e1aab65dbULL, 216, 84 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 133 | { 0xc45d1df942711d9aULL, 242, 92 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 134 | { 0x924d692ca61be758ULL, 269, 100 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 135 | { 0xda01ee641a708deaULL, 295, 108 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 136 | { 0xa26da3999aef774aULL, 322, 116 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 137 | { 0xf209787bb47d6b85ULL, 348, 124 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 138 | { 0xb454e4a179dd1877ULL, 375, 132 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 139 | { 0x865b86925b9bc5c2ULL, 402, 140 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 140 | { 0xc83553c5c8965d3dULL, 428, 148 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 141 | { 0x952ab45cfa97a0b3ULL, 455, 156 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 142 | { 0xde469fbd99a05fe3ULL, 481, 164 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 143 | { 0xa59bc234db398c25ULL, 508, 172 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 144 | { 0xf6c69a72a3989f5cULL, 534, 180 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 145 | { 0xb7dcbf5354e9beceULL, 561, 188 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 146 | { 0x88fcf317f22241e2ULL, 588, 196 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 147 | { 0xcc20ce9bd35c78a5ULL, 614, 204 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 148 | { 0x98165af37b2153dfULL, 641, 212 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 149 | { 0xe2a0b5dc971f303aULL, 667, 220 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 150 | { 0xa8d9d1535ce3b396ULL, 694, 228 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 151 | { 0xfb9b7cd9a4a7443cULL, 720, 236 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 152 | { 0xbb764c4ca7a44410ULL, 747, 244 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 153 | { 0x8bab8eefb6409c1aULL, 774, 252 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 154 | { 0xd01fef10a657842cULL, 800, 260 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 155 | { 0x9b10a4e5e9913129ULL, 827, 268 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 156 | { 0xe7109bfba19c0c9dULL, 853, 276 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 157 | { 0xac2820d9623bf429ULL, 880, 284 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 158 | { 0x80444b5e7aa7cf85ULL, 907, 292 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 159 | { 0xbf21e44003acdd2dULL, 933, 300 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 160 | { 0x8e679c2f5e44ff8fULL, 960, 308 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 161 | { 0xd433179d9c8cb841ULL, 986, 316 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 162 | { 0x9e19db92b4e31ba9ULL, 1013, 324 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 163 | { 0xeb96bf6ebadf77d9ULL, 1039, 332 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 164 | { 0xaf87023b9bf0ee6bULL, 1066, 340 } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 165 | }; | ~~ 166 | | 167 | static int cached_pow(int exp, diy_fp *p) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 168 | { | ~ 169 | int k = (int)ceil((exp+DIYFP_FRACT_SIZE-1) * D_1_LOG2_10); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 170 | int i = (k-MIN_CACHED_EXP-1) / CACHED_EXP_STEP + 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 171 | p->f = pow_cache[i].fract; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 172 | p->e = pow_cache[i].b_exp; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 173 | return pow_cache[i].d_exp; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 174 | } | ~ 175 | | 176 | static diy_fp minus(diy_fp x, diy_fp y) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 177 | { | ~ 178 | diy_fp d; d.f = x.f - y.f; d.e = x.e; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 179 | assert(x.e == y.e && x.f >= y.f); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 180 | return d; | ~~~~~~~~~ 181 | } | ~ 182 | | 183 | static diy_fp multiply(diy_fp x, diy_fp y) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 184 | { | ~ 185 | uint64_t a, b, c, d, ac, bc, ad, bd, tmp; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 186 | diy_fp r; | ~~~~~~~~~ 187 | a = x.f >> 32; b = x.f & MASK32; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 188 | c = y.f >> 32; d = y.f & MASK32; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 189 | ac = a*c; bc = b*c; | ~~~~~~~~~~~~~~~~~~~ 190 | ad = a*d; bd = b*d; | ~~~~~~~~~~~~~~~~~~~ 191 | tmp = (bd >> 32) + (ad & MASK32) + (bc & MASK32); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 192 | tmp += 1U << 31; // round | ~~~~~~~~~~~~~~~~~~~~~~~~~ 193 | r.f = ac + (ad >> 32) + (bc >> 32) + (tmp >> 32); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 194 | r.e = x.e + y.e + 64; | ~~~~~~~~~~~~~~~~~~~~~ 195 | return r; | ~~~~~~~~~ 196 | } | ~ 197 | | 198 | static diy_fp normalize_diy_fp(diy_fp n) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 199 | { | ~ 200 | assert(n.f != 0); | ~~~~~~~~~~~~~~~~~ 201 | while(!(n.f & 0xFFC0000000000000ULL)) { n.f <<= 10; n.e -= 10; } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 202 | while(!(n.f & D64_SIGN)) { n.f <<= 1; --n.e; } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 203 | return n; | ~~~~~~~~~ 204 | } | ~ 205 | | 206 | static diy_fp double2diy_fp(double d) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 207 | { | ~ 208 | diy_fp fp; | ~~~~~~~~~~ 209 | uint64_t u64 = CAST_U64(d); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 210 | if (!(u64 & D64_EXP_MASK)) { fp.f = u64 & D64_FRACT_MASK; fp.e = 1 - D64_EXP_BIAS; } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 211 | else { fp.f = (u64 & D64_FRACT_MASK) + D64_IMPLICIT_ONE; fp.e = (int)((u64 & D64_EXP_MASK) >> D64_EXP_POS) - D64_EXP_BIAS; } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 212 | return fp; | ~~~~~~~~~~ 213 | } | ~ 214 | | 215 | // pow10_cache[i] = 10^(i-1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 216 | static const unsigned int pow10_cache[] = { 0, 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000 }; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 217 | | 218 | static int largest_pow10(uint32_t n, int n_bits, uint32_t *power) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 219 | { | ~ 220 | int guess = ((n_bits + 1) * 1233 >> 12) + 1/*skip first entry*/; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 221 | if (n < pow10_cache[guess]) --guess; // We don't have any guarantees that 2^n_bits <= n. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 222 | *power = pow10_cache[guess]; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 223 | return guess; | ~~~~~~~~~~~~~ 224 | } | ~ 225 | | 226 | static int round_weed(char *buffer, int len, uint64_t wp_W, uint64_t delta, uint64_t rest, uint64_t ten_kappa, uint64_t ulp) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 227 | { | ~ 228 | uint64_t wp_Wup = wp_W - ulp; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 229 | uint64_t wp_Wdown = wp_W + ulp; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 230 | while(rest < wp_Wup && delta - rest >= ten_kappa | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 231 | && (rest + ten_kappa < wp_Wup || wp_Wup - rest >= rest + ten_kappa - wp_Wup)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 232 | { | ~ 233 | --buffer[len-1]; | ~~~~~~~~~~~~~~~~ 234 | rest += ten_kappa; | ~~~~~~~~~~~~~~~~~~ 235 | } | ~ 236 | if (rest < wp_Wdown && delta - rest >= ten_kappa | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 237 | && (rest + ten_kappa < wp_Wdown || wp_Wdown - rest > rest + ten_kappa - wp_Wdown)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 238 | return 0; | ~~~~~~~~~ 239 | | 240 | return 2*ulp <= rest && rest <= delta - 4*ulp; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 241 | } | ~ 242 | | 243 | static int digit_gen(diy_fp low, diy_fp w, diy_fp high, char *buffer, int *length, int *kappa) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 244 | { | ~ 245 | uint64_t unit = 1; | ~~~~~~~~~~~~~~~~~~ 246 | diy_fp too_low = { low.f - unit, low.e }; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 247 | diy_fp too_high = { high.f + unit, high.e }; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 248 | diy_fp unsafe_interval = minus(too_high, too_low); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 249 | diy_fp one = { 1ULL << -w.e, w.e }; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 250 | uint32_t p1 = (uint32_t)(too_high.f >> -one.e); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 251 | uint64_t p2 = too_high.f & (one.f - 1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 252 | uint32_t div; | ~~~~~~~~~~~~~ 253 | *kappa = largest_pow10(p1, DIYFP_FRACT_SIZE + one.e, &div); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 254 | *length = 0; | ~~~~~~~~~~~~ 255 | | 256 | while(*kappa > 0) | ~~~~~~~~~~~~~~~~~ 257 | { | ~ 258 | uint64_t rest; | ~~~~~~~~~~~~~~ 259 | int digit = p1 / div; | ~~~~~~~~~~~~~~~~~~~~~ 260 | buffer[*length] = (char)('0' + digit); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 261 | ++*length; | ~~~~~~~~~~ 262 | p1 %= div; | ~~~~~~~~~~ 263 | --*kappa; | ~~~~~~~~~ 264 | rest = ((uint64_t)p1 << -one.e) + p2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 265 | if (rest < unsafe_interval.f) return round_weed(buffer, *length, minus(too_high, w).f, unsafe_interval.f, rest, (uint64_t)div << -one.e, unit); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 266 | div /= 10; | ~~~~~~~~~~ 267 | } | ~ 268 | | 269 | for(;;) | ~~~~~~~ 270 | { | ~ 271 | int digit; | ~~~~~~~~~~ 272 | p2 *= 10; | ~~~~~~~~~ 273 | unit *= 10; | ~~~~~~~~~~~ 274 | unsafe_interval.f *= 10; | ~~~~~~~~~~~~~~~~~~~~~~~~ 275 | // Integer division by one. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 276 | digit = (int)(p2 >> -one.e); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 277 | buffer[*length] = (char)('0' + digit); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 278 | ++*length; | ~~~~~~~~~~ 279 | p2 &= one.f - 1; // Modulo by one. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 280 | --*kappa; | ~~~~~~~~~ 281 | if (p2 < unsafe_interval.f) return round_weed(buffer, *length, minus(too_high, w).f * unit, unsafe_interval.f, p2, one.f, unit); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 282 | } | ~ 283 | } | ~ 284 | | 285 | static int grisu3(double v, char *buffer, int *length, int *d_exp) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 286 | { | ~ 287 | int mk, kappa, success; | ~~~~~~~~~~~~~~~~~~~~~~~ 288 | diy_fp dfp = double2diy_fp(v); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 289 | diy_fp w = normalize_diy_fp(dfp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 290 | | 291 | // normalize boundaries | ~~~~~~~~~~~~~~~~~~~~~~~ 292 | diy_fp t = { (dfp.f << 1) + 1, dfp.e - 1 }; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 293 | diy_fp b_plus = normalize_diy_fp(t); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 294 | diy_fp b_minus; | ~~~~~~~~~~~~~~~ 295 | diy_fp c_mk; // Cached power of ten: 10^-k | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 296 | uint64_t u64 = CAST_U64(v); | ~~~~~~~~~~~~~~~~~~~~~~~~~ grisu3.c:296:17: note: in expansion of macro 'CAST_U64' 296 | uint64_t u64 = CAST_U64(v); | ^~~~~~~~ grisu3.c: In function 'dtoa_grisu3': grisu3.c:57:23: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] 57 | #define CAST_U64(d) (*(uint64_t*)&d) | ^~~~~~~~~~~~~~ 58 | #define MIN(x,y) ((x) <= (y) ? (x) : (y)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 59 | #define MAX(x,y) ((x) >= (y) ? (x) : (y)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 60 | | 61 | #define MIN_CACHED_EXP -348 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 62 | #define CACHED_EXP_STEP 8 | ~~~~~~~~~~~~~~~~~~~~~~~~~ 63 | | 64 | typedef struct diy_fp | ~~~~~~~~~~~~~~~~~~~~~ 65 | { | ~ 66 | uint64_t f; | ~~~~~~~~~~~ 67 | int e; | ~~~~~~ 68 | } diy_fp; | ~~~~~~~~~ 69 | | 70 | typedef struct power | ~~~~~~~~~~~~~~~~~~~~ 71 | { | ~ 72 | uint64_t fract; | ~~~~~~~~~~~~~~~ 73 | int16_t b_exp, d_exp; | ~~~~~~~~~~~~~~~~~~~~~ 74 | } power; | ~~~~~~~~ 75 | | 76 | static const power pow_cache[] = | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 77 | { | ~ 78 | { 0xfa8fd5a0081c0288ULL, -1220, -348 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 79 | { 0xbaaee17fa23ebf76ULL, -1193, -340 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 80 | { 0x8b16fb203055ac76ULL, -1166, -332 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 81 | { 0xcf42894a5dce35eaULL, -1140, -324 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 82 | { 0x9a6bb0aa55653b2dULL, -1113, -316 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 83 | { 0xe61acf033d1a45dfULL, -1087, -308 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 84 | { 0xab70fe17c79ac6caULL, -1060, -300 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 85 | { 0xff77b1fcbebcdc4fULL, -1034, -292 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 86 | { 0xbe5691ef416bd60cULL, -1007, -284 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 87 | { 0x8dd01fad907ffc3cULL, -980, -276 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 88 | { 0xd3515c2831559a83ULL, -954, -268 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 89 | { 0x9d71ac8fada6c9b5ULL, -927, -260 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 90 | { 0xea9c227723ee8bcbULL, -901, -252 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 91 | { 0xaecc49914078536dULL, -874, -244 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 92 | { 0x823c12795db6ce57ULL, -847, -236 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 93 | { 0xc21094364dfb5637ULL, -821, -228 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 94 | { 0x9096ea6f3848984fULL, -794, -220 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 95 | { 0xd77485cb25823ac7ULL, -768, -212 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 96 | { 0xa086cfcd97bf97f4ULL, -741, -204 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 97 | { 0xef340a98172aace5ULL, -715, -196 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 98 | { 0xb23867fb2a35b28eULL, -688, -188 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 99 | { 0x84c8d4dfd2c63f3bULL, -661, -180 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 100 | { 0xc5dd44271ad3cdbaULL, -635, -172 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 101 | { 0x936b9fcebb25c996ULL, -608, -164 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 102 | { 0xdbac6c247d62a584ULL, -582, -156 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 103 | { 0xa3ab66580d5fdaf6ULL, -555, -148 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 104 | { 0xf3e2f893dec3f126ULL, -529, -140 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 105 | { 0xb5b5ada8aaff80b8ULL, -502, -132 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 106 | { 0x87625f056c7c4a8bULL, -475, -124 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 107 | { 0xc9bcff6034c13053ULL, -449, -116 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 108 | { 0x964e858c91ba2655ULL, -422, -108 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 109 | { 0xdff9772470297ebdULL, -396, -100 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 110 | { 0xa6dfbd9fb8e5b88fULL, -369, -92 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 111 | { 0xf8a95fcf88747d94ULL, -343, -84 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 112 | { 0xb94470938fa89bcfULL, -316, -76 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 113 | { 0x8a08f0f8bf0f156bULL, -289, -68 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 114 | { 0xcdb02555653131b6ULL, -263, -60 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 115 | { 0x993fe2c6d07b7facULL, -236, -52 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | { 0xe45c10c42a2b3b06ULL, -210, -44 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 117 | { 0xaa242499697392d3ULL, -183, -36 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 118 | { 0xfd87b5f28300ca0eULL, -157, -28 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 119 | { 0xbce5086492111aebULL, -130, -20 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 120 | { 0x8cbccc096f5088ccULL, -103, -12 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 121 | { 0xd1b71758e219652cULL, -77, -4 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 122 | { 0x9c40000000000000ULL, -50, 4 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 123 | { 0xe8d4a51000000000ULL, -24, 12 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 124 | { 0xad78ebc5ac620000ULL, 3, 20 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 125 | { 0x813f3978f8940984ULL, 30, 28 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 126 | { 0xc097ce7bc90715b3ULL, 56, 36 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 127 | { 0x8f7e32ce7bea5c70ULL, 83, 44 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 128 | { 0xd5d238a4abe98068ULL, 109, 52 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 129 | { 0x9f4f2726179a2245ULL, 136, 60 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 130 | { 0xed63a231d4c4fb27ULL, 162, 68 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 131 | { 0xb0de65388cc8ada8ULL, 189, 76 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 132 | { 0x83c7088e1aab65dbULL, 216, 84 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 133 | { 0xc45d1df942711d9aULL, 242, 92 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 134 | { 0x924d692ca61be758ULL, 269, 100 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 135 | { 0xda01ee641a708deaULL, 295, 108 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 136 | { 0xa26da3999aef774aULL, 322, 116 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 137 | { 0xf209787bb47d6b85ULL, 348, 124 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 138 | { 0xb454e4a179dd1877ULL, 375, 132 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 139 | { 0x865b86925b9bc5c2ULL, 402, 140 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 140 | { 0xc83553c5c8965d3dULL, 428, 148 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 141 | { 0x952ab45cfa97a0b3ULL, 455, 156 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 142 | { 0xde469fbd99a05fe3ULL, 481, 164 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 143 | { 0xa59bc234db398c25ULL, 508, 172 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 144 | { 0xf6c69a72a3989f5cULL, 534, 180 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 145 | { 0xb7dcbf5354e9beceULL, 561, 188 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 146 | { 0x88fcf317f22241e2ULL, 588, 196 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 147 | { 0xcc20ce9bd35c78a5ULL, 614, 204 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 148 | { 0x98165af37b2153dfULL, 641, 212 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 149 | { 0xe2a0b5dc971f303aULL, 667, 220 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 150 | { 0xa8d9d1535ce3b396ULL, 694, 228 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 151 | { 0xfb9b7cd9a4a7443cULL, 720, 236 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 152 | { 0xbb764c4ca7a44410ULL, 747, 244 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 153 | { 0x8bab8eefb6409c1aULL, 774, 252 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 154 | { 0xd01fef10a657842cULL, 800, 260 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 155 | { 0x9b10a4e5e9913129ULL, 827, 268 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 156 | { 0xe7109bfba19c0c9dULL, 853, 276 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 157 | { 0xac2820d9623bf429ULL, 880, 284 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 158 | { 0x80444b5e7aa7cf85ULL, 907, 292 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 159 | { 0xbf21e44003acdd2dULL, 933, 300 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 160 | { 0x8e679c2f5e44ff8fULL, 960, 308 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 161 | { 0xd433179d9c8cb841ULL, 986, 316 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 162 | { 0x9e19db92b4e31ba9ULL, 1013, 324 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 163 | { 0xeb96bf6ebadf77d9ULL, 1039, 332 }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 164 | { 0xaf87023b9bf0ee6bULL, 1066, 340 } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 165 | }; | ~~ 166 | | 167 | static int cached_pow(int exp, diy_fp *p) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 168 | { | ~ 169 | int k = (int)ceil((exp+DIYFP_FRACT_SIZE-1) * D_1_LOG2_10); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 170 | int i = (k-MIN_CACHED_EXP-1) / CACHED_EXP_STEP + 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 171 | p->f = pow_cache[i].fract; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 172 | p->e = pow_cache[i].b_exp; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 173 | return pow_cache[i].d_exp; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 174 | } | ~ 175 | | 176 | static diy_fp minus(diy_fp x, diy_fp y) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 177 | { | ~ 178 | diy_fp d; d.f = x.f - y.f; d.e = x.e; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 179 | assert(x.e == y.e && x.f >= y.f); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 180 | return d; | ~~~~~~~~~ 181 | } | ~ 182 | | 183 | static diy_fp multiply(diy_fp x, diy_fp y) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 184 | { | ~ 185 | uint64_t a, b, c, d, ac, bc, ad, bd, tmp; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 186 | diy_fp r; | ~~~~~~~~~ 187 | a = x.f >> 32; b = x.f & MASK32; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 188 | c = y.f >> 32; d = y.f & MASK32; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 189 | ac = a*c; bc = b*c; | ~~~~~~~~~~~~~~~~~~~ 190 | ad = a*d; bd = b*d; | ~~~~~~~~~~~~~~~~~~~ 191 | tmp = (bd >> 32) + (ad & MASK32) + (bc & MASK32); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 192 | tmp += 1U << 31; // round | ~~~~~~~~~~~~~~~~~~~~~~~~~ 193 | r.f = ac + (ad >> 32) + (bc >> 32) + (tmp >> 32); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 194 | r.e = x.e + y.e + 64; | ~~~~~~~~~~~~~~~~~~~~~ 195 | return r; | ~~~~~~~~~ 196 | } | ~ 197 | | 198 | static diy_fp normalize_diy_fp(diy_fp n) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 199 | { | ~ 200 | assert(n.f != 0); | ~~~~~~~~~~~~~~~~~ 201 | while(!(n.f & 0xFFC0000000000000ULL)) { n.f <<= 10; n.e -= 10; } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 202 | while(!(n.f & D64_SIGN)) { n.f <<= 1; --n.e; } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 203 | return n; | ~~~~~~~~~ 204 | } | ~ 205 | | 206 | static diy_fp double2diy_fp(double d) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 207 | { | ~ 208 | diy_fp fp; | ~~~~~~~~~~ 209 | uint64_t u64 = CAST_U64(d); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 210 | if (!(u64 & D64_EXP_MASK)) { fp.f = u64 & D64_FRACT_MASK; fp.e = 1 - D64_EXP_BIAS; } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 211 | else { fp.f = (u64 & D64_FRACT_MASK) + D64_IMPLICIT_ONE; fp.e = (int)((u64 & D64_EXP_MASK) >> D64_EXP_POS) - D64_EXP_BIAS; } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 212 | return fp; | ~~~~~~~~~~ 213 | } | ~ 214 | | 215 | // pow10_cache[i] = 10^(i-1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 216 | static const unsigned int pow10_cache[] = { 0, 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000 }; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 217 | | 218 | static int largest_pow10(uint32_t n, int n_bits, uint32_t *power) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 219 | { | ~ 220 | int guess = ((n_bits + 1) * 1233 >> 12) + 1/*skip first entry*/; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 221 | if (n < pow10_cache[guess]) --guess; // We don't have any guarantees that 2^n_bits <= n. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 222 | *power = pow10_cache[guess]; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 223 | return guess; | ~~~~~~~~~~~~~ 224 | } | ~ 225 | | 226 | static int round_weed(char *buffer, int len, uint64_t wp_W, uint64_t delta, uint64_t rest, uint64_t ten_kappa, uint64_t ulp) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 227 | { | ~ 228 | uint64_t wp_Wup = wp_W - ulp; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 229 | uint64_t wp_Wdown = wp_W + ulp; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 230 | while(rest < wp_Wup && delta - rest >= ten_kappa | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 231 | && (rest + ten_kappa < wp_Wup || wp_Wup - rest >= rest + ten_kappa - wp_Wup)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 232 | { | ~ 233 | --buffer[len-1]; | ~~~~~~~~~~~~~~~~ 234 | rest += ten_kappa; | ~~~~~~~~~~~~~~~~~~ 235 | } | ~ 236 | if (rest < wp_Wdown && delta - rest >= ten_kappa | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 237 | && (rest + ten_kappa < wp_Wdown || wp_Wdown - rest > rest + ten_kappa - wp_Wdown)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 238 | return 0; | ~~~~~~~~~ 239 | | 240 | return 2*ulp <= rest && rest <= delta - 4*ulp; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 241 | } | ~ 242 | | 243 | static int digit_gen(diy_fp low, diy_fp w, diy_fp high, char *buffer, int *length, int *kappa) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 244 | { | ~ 245 | uint64_t unit = 1; | ~~~~~~~~~~~~~~~~~~ 246 | diy_fp too_low = { low.f - unit, low.e }; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 247 | diy_fp too_high = { high.f + unit, high.e }; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 248 | diy_fp unsafe_interval = minus(too_high, too_low); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 249 | diy_fp one = { 1ULL << -w.e, w.e }; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 250 | uint32_t p1 = (uint32_t)(too_high.f >> -one.e); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 251 | uint64_t p2 = too_high.f & (one.f - 1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 252 | uint32_t div; | ~~~~~~~~~~~~~ 253 | *kappa = largest_pow10(p1, DIYFP_FRACT_SIZE + one.e, &div); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 254 | *length = 0; | ~~~~~~~~~~~~ 255 | | 256 | while(*kappa > 0) | ~~~~~~~~~~~~~~~~~ 257 | { | ~ 258 | uint64_t rest; | ~~~~~~~~~~~~~~ 259 | int digit = p1 / div; | ~~~~~~~~~~~~~~~~~~~~~ 260 | buffer[*length] = (char)('0' + digit); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 261 | ++*length; | ~~~~~~~~~~ 262 | p1 %= div; | ~~~~~~~~~~ 263 | --*kappa; | ~~~~~~~~~ 264 | rest = ((uint64_t)p1 << -one.e) + p2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 265 | if (rest < unsafe_interval.f) return round_weed(buffer, *length, minus(too_high, w).f, unsafe_interval.f, rest, (uint64_t)div << -one.e, unit); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 266 | div /= 10; | ~~~~~~~~~~ 267 | } | ~ 268 | | 269 | for(;;) | ~~~~~~~ 270 | { | ~ 271 | int digit; | ~~~~~~~~~~ 272 | p2 *= 10; | ~~~~~~~~~ 273 | unit *= 10; | ~~~~~~~~~~~ 274 | unsafe_interval.f *= 10; | ~~~~~~~~~~~~~~~~~~~~~~~~ 275 | // Integer division by one. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 276 | digit = (int)(p2 >> -one.e); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 277 | buffer[*length] = (char)('0' + digit); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 278 | ++*length; | ~~~~~~~~~~ 279 | p2 &= one.f - 1; // Modulo by one. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 280 | --*kappa; | ~~~~~~~~~ 281 | if (p2 < unsafe_interval.f) return round_weed(buffer, *length, minus(too_high, w).f * unit, unsafe_interval.f, p2, one.f, unit); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 282 | } | ~ 283 | } | ~ 284 | | 285 | static int grisu3(double v, char *buffer, int *length, int *d_exp) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 286 | { | ~ 287 | int mk, kappa, success; | ~~~~~~~~~~~~~~~~~~~~~~~ 288 | diy_fp dfp = double2diy_fp(v); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 289 | diy_fp w = normalize_diy_fp(dfp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 290 | | 291 | // normalize boundaries | ~~~~~~~~~~~~~~~~~~~~~~~ 292 | diy_fp t = { (dfp.f << 1) + 1, dfp.e - 1 }; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 293 | diy_fp b_plus = normalize_diy_fp(t); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 294 | diy_fp b_minus; | ~~~~~~~~~~~~~~~ 295 | diy_fp c_mk; // Cached power of ten: 10^-k | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 296 | uint64_t u64 = CAST_U64(v); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 297 | assert(v > 0 && v <= 1.7976931348623157e308); // Grisu only handles strictly positive finite numbers. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 298 | if (!(u64 & D64_FRACT_MASK) && (u64 & D64_EXP_MASK) != 0) { b_minus.f = (dfp.f << 2) - 1; b_minus.e = dfp.e - 2;} // lower boundary is closer? | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 299 | else { b_minus.f = (dfp.f << 1) - 1; b_minus.e = dfp.e - 1; } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 300 | b_minus.f = b_minus.f << (b_minus.e - b_plus.e); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 301 | b_minus.e = b_plus.e; | ~~~~~~~~~~~~~~~~~~~~~ 302 | | 303 | mk = cached_pow(MIN_TARGET_EXP - DIYFP_FRACT_SIZE - w.e, &c_mk); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 304 | | 305 | w = multiply(w, c_mk); | ~~~~~~~~~~~~~~~~~~~~~~ 306 | b_minus = multiply(b_minus, c_mk); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 307 | b_plus = multiply(b_plus, c_mk); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 308 | | 309 | success = digit_gen(b_minus, w, b_plus, buffer, length, &kappa); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 310 | *d_exp = kappa - mk; | ~~~~~~~~~~~~~~~~~~~~ 311 | return success; | ~~~~~~~~~~~~~~~ 312 | } | ~ 313 | | 314 | static int i_to_str(int val, char *str) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 315 | { | ~ 316 | int len, i; | ~~~~~~~~~~~ 317 | char *s; | ~~~~~~~~ 318 | char *begin = str; | ~~~~~~~~~~~~~~~~~~ 319 | if (val < 0) { *str++ = '-'; val = -val; } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 320 | s = str; | ~~~~~~~~ 321 | | 322 | for(;;) | ~~~~~~~ 323 | { | ~ 324 | int ni = val / 10; | ~~~~~~~~~~~~~~~~~~ 325 | int digit = val - ni*10; | ~~~~~~~~~~~~~~~~~~~~~~~~ 326 | *s++ = (char)('0' + digit); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 327 | if (ni == 0) | ~~~~~~~~~~~~ 328 | break; | ~~~~~~ 329 | val = ni; | ~~~~~~~~~ 330 | } | ~ 331 | *s = '\0'; | ~~~~~~~~~~ 332 | len = (int)(s - str); | ~~~~~~~~~~~~~~~~~~~~~ 333 | for(i = 0; i < len/2; ++i) | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 334 | { | ~ 335 | char ch = str[i]; | ~~~~~~~~~~~~~~~~~ 336 | str[i] = str[len-1-i]; | ~~~~~~~~~~~~~~~~~~~~~~ 337 | str[len-1-i] = ch; | ~~~~~~~~~~~~~~~~~~ 338 | } | ~ 339 | | 340 | return (int)(s - begin); | ~~~~~~~~~~~~~~~~~~~~~~~~ 341 | } | ~ 342 | | 343 | int dtoa_grisu3(double v, char *dst) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 344 | { | ~ 345 | int d_exp, len, success, decimals, i; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 346 | uint64_t u64 = CAST_U64(v); | ~~~~~~~~~~~~~~~~~~~~~~~~~ grisu3.c:346:17: note: in expansion of macro 'CAST_U64' 346 | uint64_t u64 = CAST_U64(v); | ^~~~~~~~ gcc -I"/usr/include/R" -DNDEBUG -I'/usr/share/R/library/BH/include' -I'/usr/share/R/library/cpp11/include' -I/usr/local/include -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -c init.c -o init.o gcc -I"/usr/include/R" -DNDEBUG -I'/usr/share/R/library/BH/include' -I'/usr/share/R/library/cpp11/include' -I/usr/local/include -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -c localtime.c -o localtime.o g++ -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I'/usr/share/R/library/BH/include' -I'/usr/share/R/library/cpp11/include' -I/usr/local/include -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -c parse.cpp -o parse.o g++ -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I'/usr/share/R/library/BH/include' -I'/usr/share/R/library/cpp11/include' -I/usr/local/include -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -c read.cpp -o read.o g++ -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I'/usr/share/R/library/BH/include' -I'/usr/share/R/library/cpp11/include' -I/usr/local/include -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -c type_convert.cpp -o type_convert.o g++ -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I'/usr/share/R/library/BH/include' -I'/usr/share/R/library/cpp11/include' -I/usr/local/include -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -c write.cpp -o write.o In file included from /usr/share/R/library/BH/include/boost/mpl/aux_/na_assert.hpp:23, from /usr/share/R/library/BH/include/boost/mpl/arg.hpp:25, from /usr/share/R/library/BH/include/boost/mpl/placeholders.hpp:24, from /usr/share/R/library/BH/include/boost/iterator/iterator_categories.hpp:16, from /usr/share/R/library/BH/include/boost/iterator/iterator_facade.hpp:13, from /usr/share/R/library/BH/include/boost/range/iterator_range_core.hpp:27, from /usr/share/R/library/BH/include/boost/range/iterator_range.hpp:13, from /usr/share/R/library/BH/include/boost/iostreams/traits.hpp:38, from /usr/share/R/library/BH/include/boost/iostreams/detail/dispatch.hpp:17, from /usr/share/R/library/BH/include/boost/iostreams/flush.hpp:17, from /usr/share/R/library/BH/include/boost/iostreams/close.hpp:18, from /usr/share/R/library/BH/include/boost/iostreams/detail/functional.hpp:24, from /usr/share/R/library/BH/include/boost/iostreams/detail/streambuf/direct_streambuf.hpp:24, from /usr/share/R/library/BH/include/boost/iostreams/stream_buffer.hpp:21, from /usr/share/R/library/BH/include/boost/iostreams/stream.hpp:21, from write.cpp:6: /usr/share/R/library/BH/include/boost/mpl/assert.hpp:194:21: warning: unnecessary parentheses in declaration of 'assert_arg' [-Wparentheses] 194 | failed ************ (Pred::************ | ^ /usr/share/R/library/BH/include/boost/mpl/assert.hpp:199:21: warning: unnecessary parentheses in declaration of 'assert_not_arg' [-Wparentheses] 199 | failed ************ (boost::mpl::not_::************ | ^ g++ -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I'/usr/share/R/library/BH/include' -I'/usr/share/R/library/cpp11/include' -I/usr/local/include -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -c write_connection.cpp -o write_connection.o g++ -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I'/usr/share/R/library/BH/include' -I'/usr/share/R/library/cpp11/include' -I/usr/local/include -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -c write_delim.cpp -o write_delim.o In file included from /usr/share/R/library/BH/include/boost/mpl/aux_/na_assert.hpp:23, from /usr/share/R/library/BH/include/boost/mpl/arg.hpp:25, from /usr/share/R/library/BH/include/boost/mpl/placeholders.hpp:24, from /usr/share/R/library/BH/include/boost/iterator/iterator_categories.hpp:16, from /usr/share/R/library/BH/include/boost/iterator/iterator_facade.hpp:13, from /usr/share/R/library/BH/include/boost/range/iterator_range_core.hpp:27, from /usr/share/R/library/BH/include/boost/range/iterator_range.hpp:13, from /usr/share/R/library/BH/include/boost/iostreams/traits.hpp:38, from /usr/share/R/library/BH/include/boost/iostreams/detail/dispatch.hpp:17, from /usr/share/R/library/BH/include/boost/iostreams/flush.hpp:17, from /usr/share/R/library/BH/include/boost/iostreams/close.hpp:18, from /usr/share/R/library/BH/include/boost/iostreams/detail/functional.hpp:24, from /usr/share/R/library/BH/include/boost/iostreams/detail/streambuf/direct_streambuf.hpp:24, from /usr/share/R/library/BH/include/boost/iostreams/stream_buffer.hpp:21, from /usr/share/R/library/BH/include/boost/iostreams/stream.hpp:21, from write_delim.cpp:7: /usr/share/R/library/BH/include/boost/mpl/assert.hpp:194:21: warning: unnecessary parentheses in declaration of 'assert_arg' [-Wparentheses] 194 | failed ************ (Pred::************ | ^ /usr/share/R/library/BH/include/boost/mpl/assert.hpp:199:21: warning: unnecessary parentheses in declaration of 'assert_not_arg' [-Wparentheses] 199 | failed ************ (boost::mpl::not_::************ | ^ g++ -std=gnu++11 -shared -L/usr/lib64/R/lib -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o readr.so Collector.o CollectorGuess.o Iconv.o LocaleInfo.o Reader.o Source.o Tokenizer.o TokenizerDelim.o TokenizerFwf.o TokenizerWs.o connection.o cpp11.o datetime.o grisu3.o init.o localtime.o parse.o read.o type_convert.o write.o write_connection.o write_delim.o -L/usr/lib64/R/lib -lR installing to /builddir/build/BUILDROOT/R-readr-1.4.0-1.fc33.aarch64/usr/lib64/R/library/00LOCK-readr/00new/readr/libs ** R ** inst ** byte-compile and prepare package for lazy loading ** help *** installing help indices converting help for package 'readr' finding HTML links ... done Tokenizers html as.col_spec html callback html Rd warning: /builddir/build/BUILD/readr/readr/man/callback.Rd:132: file link 'ChunkCallback' in package 'readr' does not exist and so has been treated as a topic Rd warning: /builddir/build/BUILD/readr/readr/man/callback.Rd:197: file link 'ChunkCallback' in package 'readr' does not exist and so has been treated as a topic Rd warning: /builddir/build/BUILD/readr/readr/man/callback.Rd:271: file link 'ChunkCallback' in package 'readr' does not exist and so has been treated as a topic Rd warning: /builddir/build/BUILD/readr/readr/man/callback.Rd:345: file link 'ChunkCallback' in package 'readr' does not exist and so has been treated as a topic clipboard html col_skip html cols html count_fields html datasource html date_names html encoding html format_delim html locale html melt_delim html finding level-2 HTML links ... done melt_delim_chunked html melt_fwf html melt_table html output_column html parse_atomic html parse_datetime html parse_factor html parse_guess html parse_number html parse_vector html problems html read_builtin html read_delim html read_delim_chunked html read_file html read_fwf html read_lines html read_lines_chunked html read_log html read_rds html read_table html readr-package html readr_example html show_progress html spec html spec_delim html tokenize html type_convert html write_delim html *** copying figures ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (readr) + test -d readr/src + cd readr/src + rm -f Collector.o CollectorGuess.o Iconv.o LocaleInfo.o Reader.o Source.o Tokenizer.o TokenizerDelim.o TokenizerFwf.o TokenizerWs.o connection.o cpp11.o datetime.o grisu3.o init.o localtime.o parse.o read.o type_convert.o write.o write_connection.o write_delim.o readr.so + rm -f /builddir/build/BUILDROOT/R-readr-1.4.0-1.fc33.aarch64/usr/lib64/R/library/R.css + /usr/lib/rpm/find-debuginfo.sh -j5 --strict-build-id -m -i --build-id-seed 1.4.0-1.fc33 --unique-debug-suffix -1.4.0-1.fc33.aarch64 --unique-debug-src-base R-readr-1.4.0-1.fc33.aarch64 --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 -S debugsourcefiles.list /builddir/build/BUILD/readr explicitly decompress any DWARF compressed ELF sections in /builddir/build/BUILDROOT/R-readr-1.4.0-1.fc33.aarch64/usr/lib64/R/library/readr/libs/readr.so extracting debug info from /builddir/build/BUILDROOT/R-readr-1.4.0-1.fc33.aarch64/usr/lib64/R/library/readr/libs/readr.so original debug info size: 10968kB, size after compression: 7596kB /usr/lib/rpm/sepdebugcrcfix: Updated 1 CRC32s, 0 CRC32s did match. 439 blocks + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-ldconfig + /usr/lib/rpm/brp-compress + /usr/lib/rpm/redhat/brp-strip-lto /usr/bin/strip + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/redhat/brp-python-bytecompile '' 1 0 + /usr/lib/rpm/brp-python-hardlink + /usr/lib/rpm/redhat/brp-mangle-shebangs Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.OIAOkV + umask 022 + cd /builddir/build/BUILD + cd readr + export LANG=C.UTF-8 + LANG=C.UTF-8 + /usr/bin/R CMD check readr * using log directory ‘/builddir/build/BUILD/readr/readr.Rcheck’ * using R version 4.0.2 (2020-06-22) * using platform: aarch64-redhat-linux-gnu (64-bit) * using session charset: UTF-8 * checking for file ‘readr/DESCRIPTION’ ... OK * this is package ‘readr’ version ‘1.4.0’ * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ...Warning: unable to access index for repository https://CRAN.R-project.org/src/contrib: cannot open URL 'https://CRAN.R-project.org/src/contrib/PACKAGES' Warning: unable to access index for repository https://bioconductor.org/packages/3.11/bioc/src/contrib: cannot open URL 'https://bioconductor.org/packages/3.11/bioc/src/contrib/PACKAGES' Warning: unable to access index for repository https://bioconductor.org/packages/3.11/data/annotation/src/contrib: cannot open URL 'https://bioconductor.org/packages/3.11/data/annotation/src/contrib/PACKAGES' Warning: unable to access index for repository https://bioconductor.org/packages/3.11/data/experiment/src/contrib: cannot open URL 'https://bioconductor.org/packages/3.11/data/experiment/src/contrib/PACKAGES' OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘readr’ can be installed ... OK * checking installed package size ... NOTE installed size is 10.7Mb sub-directories of 1Mb or more: libs 9.8Mb * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... WARNING Error: package or namespace load failed for ‘readr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called ‘R6’ Execution halted It looks like this package has a loading problem when not on .libPaths: see the messages for details. * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking R/sysdata.rda ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking compiled code ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... OK * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘spelling.R’ Running ‘testthat.R’ OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes in ‘inst/doc’ ... OK * checking running R code from vignettes ... ‘locales.Rmd’ using ‘UTF-8’... OK ‘readr.Rmd’ using ‘UTF-8’... OK NONE * checking re-building of vignette outputs ... OK * checking PDF version of manual ... OK * DONE Status: 1 WARNING, 1 NOTE See ‘/builddir/build/BUILD/readr/readr.Rcheck/00check.log’ for details. + RPM_EC=0 ++ jobs -p + exit 0 Processing files: R-readr-1.4.0-1.fc33.aarch64 Provides: R(readr) = 1.4.0 R-readr = 1.4.0-1.fc33 R-readr(aarch-64) = 1.4.0-1.fc33 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires: R(ABI) = 4.0 R(R6) R(cli) R(clipr) R(crayon) R(hms) >= 0.4.1 R(lifecycle) R(methods) R(rlang) R(tibble) R(utils) R-core >= 3.1 ld-linux-aarch64.so.1()(64bit) ld-linux-aarch64.so.1(GLIBC_2.17)(64bit) libR.so()(64bit) libc.so.6()(64bit) libc.so.6(GLIBC_2.17)(64bit) libgcc_s.so.1()(64bit) libgcc_s.so.1(GCC_3.0)(64bit) libgcc_s.so.1(GCC_3.3.1)(64bit) libgcc_s.so.1(GCC_4.2.0)(64bit) libm.so.6()(64bit) libm.so.6(GLIBC_2.17)(64bit) libm.so.6(GLIBC_2.29)(64bit) libstdc++.so.6()(64bit) libstdc++.so.6(CXXABI_1.3)(64bit) libstdc++.so.6(GLIBCXX_3.4)(64bit) libstdc++.so.6(GLIBCXX_3.4.21)(64bit) libstdc++.so.6(GLIBCXX_3.4.26)(64bit) libstdc++.so.6(GLIBCXX_3.4.9)(64bit) rtld(GNU_HASH) Suggests: R(curl) R(dplyr) R(knitr) R(rmarkdown) R(spelling) R(stringi) R(testthat) R(xml2) Processing files: R-readr-debugsource-1.4.0-1.fc33.aarch64 Provides: R-readr-debugsource = 1.4.0-1.fc33 R-readr-debugsource(aarch-64) = 1.4.0-1.fc33 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Processing files: R-readr-debuginfo-1.4.0-1.fc33.aarch64 Provides: R-readr-debuginfo = 1.4.0-1.fc33 R-readr-debuginfo(aarch-64) = 1.4.0-1.fc33 debuginfo(build-id) = ef27fa544a6dd39b064941a4a9542eb2f8f39709 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Recommends: R-readr-debugsource(aarch-64) = 1.4.0-1.fc33 Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/R-readr-1.4.0-1.fc33.aarch64 Wrote: /builddir/build/RPMS/R-readr-debugsource-1.4.0-1.fc33.aarch64.rpm Wrote: /builddir/build/RPMS/R-readr-1.4.0-1.fc33.aarch64.rpm Wrote: /builddir/build/RPMS/R-readr-debuginfo-1.4.0-1.fc33.aarch64.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.caFKHT + umask 022 + cd /builddir/build/BUILD + cd readr + /usr/bin/rm -rf /builddir/build/BUILDROOT/R-readr-1.4.0-1.fc33.aarch64 + RPM_EC=0 ++ jobs -p + exit 0 Child return code was: 0