0s autopkgtest [16:06:13]: starting date and time: 2025-03-15 16:06:13+0000 0s autopkgtest [16:06:13]: git checkout: 325255d2 Merge branch 'pin-any-arch' into 'ubuntu/production' 0s autopkgtest [16:06:13]: host juju-7f2275-prod-proposed-migration-environment-9; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.xqs03k5j/out --timeout-copy=6000 --setup-commands 'ln -s /dev/null /etc/systemd/system/bluetooth.service; printf "http_proxy=http://squid.internal:3128\nhttps_proxy=http://squid.internal:3128\nno_proxy=127.0.0.1,127.0.1.1,login.ubuntu.com,localhost,localdomain,novalocal,internal,archive.ubuntu.com,ports.ubuntu.com,security.ubuntu.com,ddebs.ubuntu.com,changelogs.ubuntu.com,keyserver.ubuntu.com,launchpadlibrarian.net,launchpadcontent.net,launchpad.net,10.24.0.0/24,keystone.ps5.canonical.com,objectstorage.prodstack5.canonical.com,radosgw.ps5.canonical.com\n" >> /etc/environment' --apt-pocket=proposed=src:glibc --apt-upgrade r-cran-expm --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=glibc/2.41-1ubuntu2 -- lxd -r lxd-armhf-10.145.243.171 lxd-armhf-10.145.243.171:autopkgtest/ubuntu/plucky/armhf 21s autopkgtest [16:06:34]: testbed dpkg architecture: armhf 23s autopkgtest [16:06:36]: testbed apt version: 2.9.33 27s autopkgtest [16:06:40]: @@@@@@@@@@@@@@@@@@@@ test bed setup 29s autopkgtest [16:06:42]: testbed release detected to be: None 36s autopkgtest [16:06:49]: updating testbed package index (apt update) 38s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [126 kB] 38s Get:2 http://ftpmaster.internal/ubuntu plucky InRelease [257 kB] 39s Get:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease [126 kB] 39s Get:4 http://ftpmaster.internal/ubuntu plucky-security InRelease [126 kB] 40s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [15.8 kB] 40s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [99.7 kB] 40s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [379 kB] 40s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/main armhf Packages [114 kB] 40s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/main armhf c-n-f Metadata [1832 B] 40s Get:10 http://ftpmaster.internal/ubuntu plucky-proposed/restricted armhf c-n-f Metadata [116 B] 40s Get:11 http://ftpmaster.internal/ubuntu plucky-proposed/universe armhf Packages [312 kB] 41s Get:12 http://ftpmaster.internal/ubuntu plucky-proposed/universe armhf c-n-f Metadata [11.1 kB] 41s Get:13 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse armhf Packages [3472 B] 41s Get:14 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse armhf c-n-f Metadata [240 B] 41s Get:15 http://ftpmaster.internal/ubuntu plucky/main Sources [1394 kB] 42s Get:16 http://ftpmaster.internal/ubuntu plucky/universe Sources [21.0 MB] 67s Get:17 http://ftpmaster.internal/ubuntu plucky/multiverse Sources [299 kB] 68s Get:18 http://ftpmaster.internal/ubuntu plucky/main armhf Packages [1378 kB] 70s Get:19 http://ftpmaster.internal/ubuntu plucky/main armhf c-n-f Metadata [29.4 kB] 70s Get:20 http://ftpmaster.internal/ubuntu plucky/restricted armhf c-n-f Metadata [108 B] 70s Get:21 http://ftpmaster.internal/ubuntu plucky/universe armhf Packages [15.1 MB] 88s Get:22 http://ftpmaster.internal/ubuntu plucky/multiverse armhf Packages [172 kB] 89s Fetched 41.0 MB in 51s (800 kB/s) 90s Reading package lists... 97s autopkgtest [16:07:50]: upgrading testbed (apt dist-upgrade and autopurge) 99s Reading package lists... 99s Building dependency tree... 99s Reading state information... 100s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 100s Starting 2 pkgProblemResolver with broken count: 0 100s Done 101s Entering ResolveByKeep 101s 101s Calculating upgrade... 102s The following packages will be upgraded: 102s libc-bin libc6 locales pinentry-curses python3-jinja2 sos strace 102s 7 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 102s Need to get 8683 kB of archives. 102s After this operation, 23.6 kB of additional disk space will be used. 102s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed/main armhf libc6 armhf 2.41-1ubuntu2 [2932 kB] 105s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/main armhf libc-bin armhf 2.41-1ubuntu2 [545 kB] 106s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/main armhf locales all 2.41-1ubuntu2 [4246 kB] 111s Get:4 http://ftpmaster.internal/ubuntu plucky/main armhf strace armhf 6.13+ds-1ubuntu1 [445 kB] 111s Get:5 http://ftpmaster.internal/ubuntu plucky/main armhf pinentry-curses armhf 1.3.1-2ubuntu3 [40.6 kB] 112s Get:6 http://ftpmaster.internal/ubuntu plucky/main armhf python3-jinja2 all 3.1.5-2ubuntu1 [109 kB] 112s Get:7 http://ftpmaster.internal/ubuntu plucky/main armhf sos all 4.9.0-5 [365 kB] 113s Preconfiguring packages ... 113s Fetched 8683 kB in 10s (838 kB/s) 113s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 64655 files and directories currently installed.) 113s Preparing to unpack .../libc6_2.41-1ubuntu2_armhf.deb ... 113s Unpacking libc6:armhf (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 113s Setting up libc6:armhf (2.41-1ubuntu2) ... 113s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 64655 files and directories currently installed.) 113s Preparing to unpack .../libc-bin_2.41-1ubuntu2_armhf.deb ... 113s Unpacking libc-bin (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 113s Setting up libc-bin (2.41-1ubuntu2) ... 114s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 64655 files and directories currently installed.) 114s Preparing to unpack .../locales_2.41-1ubuntu2_all.deb ... 114s Unpacking locales (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 114s Preparing to unpack .../strace_6.13+ds-1ubuntu1_armhf.deb ... 114s Unpacking strace (6.13+ds-1ubuntu1) over (6.11-0ubuntu1) ... 114s Preparing to unpack .../pinentry-curses_1.3.1-2ubuntu3_armhf.deb ... 114s Unpacking pinentry-curses (1.3.1-2ubuntu3) over (1.3.1-2ubuntu2) ... 114s Preparing to unpack .../python3-jinja2_3.1.5-2ubuntu1_all.deb ... 114s Unpacking python3-jinja2 (3.1.5-2ubuntu1) over (3.1.5-2) ... 114s Preparing to unpack .../archives/sos_4.9.0-5_all.deb ... 115s Unpacking sos (4.9.0-5) over (4.9.0-4) ... 115s Setting up sos (4.9.0-5) ... 115s Setting up pinentry-curses (1.3.1-2ubuntu3) ... 115s Setting up locales (2.41-1ubuntu2) ... 116s Generating locales (this might take a while)... 118s en_US.UTF-8... done 118s Generation complete. 118s Setting up python3-jinja2 (3.1.5-2ubuntu1) ... 118s Setting up strace (6.13+ds-1ubuntu1) ... 118s Processing triggers for man-db (2.13.0-1) ... 120s Processing triggers for systemd (257.3-1ubuntu3) ... 122s Reading package lists... 122s Building dependency tree... 122s Reading state information... 123s Starting pkgProblemResolver with broken count: 0 123s Starting 2 pkgProblemResolver with broken count: 0 123s Done 123s Solving dependencies... 124s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 126s autopkgtest [16:08:19]: rebooting testbed after setup commands that affected boot 166s autopkgtest [16:08:59]: testbed running kernel: Linux 6.8.0-52-generic #53~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jan 15 18:10:51 UTC 2 189s autopkgtest [16:09:22]: @@@@@@@@@@@@@@@@@@@@ apt-source r-cran-expm 199s Get:1 http://ftpmaster.internal/ubuntu plucky/universe r-cran-expm 1.0-0-1 (dsc) [2115 B] 199s Get:2 http://ftpmaster.internal/ubuntu plucky/universe r-cran-expm 1.0-0-1 (tar) [141 kB] 199s Get:3 http://ftpmaster.internal/ubuntu plucky/universe r-cran-expm 1.0-0-1 (diff) [3176 B] 200s gpgv: Signature made Mon Oct 7 04:29:42 2024 UTC 200s gpgv: using RSA key 73471499CC60ED9EEE805946C5BD6C8F2295D502 200s gpgv: issuer "plessy@debian.org" 200s gpgv: Can't check signature: No public key 200s dpkg-source: warning: cannot verify inline signature for ./r-cran-expm_1.0-0-1.dsc: no acceptable signature found 200s autopkgtest [16:09:33]: testing package r-cran-expm version 1.0-0-1 202s autopkgtest [16:09:35]: build not needed 204s autopkgtest [16:09:37]: test run-unit-test: preparing testbed 206s Reading package lists... 206s Building dependency tree... 206s Reading state information... 207s Starting pkgProblemResolver with broken count: 0 207s Starting 2 pkgProblemResolver with broken count: 0 207s Done 208s The following NEW packages will be installed: 208s fontconfig fontconfig-config fonts-dejavu-core fonts-dejavu-mono libblas3 208s libcairo2 libdatrie1 libdeflate0 libfontconfig1 libfreetype6 libgfortran5 208s libgomp1 libgraphite2-3 libharfbuzz0b libice6 libjbig0 libjpeg-turbo8 208s libjpeg8 liblapack3 liblerc4 libpango-1.0-0 libpangocairo-1.0-0 208s libpangoft2-1.0-0 libpaper-utils libpaper2 libpixman-1-0 libsharpyuv0 libsm6 208s libtcl8.6 libthai-data libthai0 libtiff6 libtk8.6 libwebp7 libxcb-render0 208s libxcb-shm0 libxft2 libxrender1 libxss1 libxt6t64 r-base-core r-cran-expm 208s r-cran-gmp r-cran-lattice r-cran-matrix r-cran-rcolorbrewer r-cran-rmpfr 208s r-cran-sfsmisc unzip x11-common xdg-utils zip 208s 0 upgraded, 52 newly installed, 0 to remove and 0 not upgraded. 208s Need to get 45.5 MB of archives. 208s After this operation, 82.7 MB of additional disk space will be used. 208s Get:1 http://ftpmaster.internal/ubuntu plucky/main armhf libfreetype6 armhf 2.13.3+dfsg-1 [330 kB] 209s Get:2 http://ftpmaster.internal/ubuntu plucky/main armhf fonts-dejavu-mono all 2.37-8 [502 kB] 210s Get:3 http://ftpmaster.internal/ubuntu plucky/main armhf fonts-dejavu-core all 2.37-8 [835 kB] 211s Get:4 http://ftpmaster.internal/ubuntu plucky/main armhf fontconfig-config armhf 2.15.0-2ubuntu1 [37.5 kB] 211s Get:5 http://ftpmaster.internal/ubuntu plucky/main armhf libfontconfig1 armhf 2.15.0-2ubuntu1 [114 kB] 212s Get:6 http://ftpmaster.internal/ubuntu plucky/main armhf fontconfig armhf 2.15.0-2ubuntu1 [190 kB] 212s Get:7 http://ftpmaster.internal/ubuntu plucky/main armhf libblas3 armhf 3.12.1-2 [132 kB] 212s Get:8 http://ftpmaster.internal/ubuntu plucky/main armhf libpixman-1-0 armhf 0.44.0-3 [183 kB] 213s Get:9 http://ftpmaster.internal/ubuntu plucky/main armhf libxcb-render0 armhf 1.17.0-2 [15.3 kB] 213s Get:10 http://ftpmaster.internal/ubuntu plucky/main armhf libxcb-shm0 armhf 1.17.0-2 [5774 B] 213s Get:11 http://ftpmaster.internal/ubuntu plucky/main armhf libxrender1 armhf 1:0.9.10-1.1build1 [16.0 kB] 213s Get:12 http://ftpmaster.internal/ubuntu plucky/main armhf libcairo2 armhf 1.18.2-2 [484 kB] 213s Get:13 http://ftpmaster.internal/ubuntu plucky/main armhf libdatrie1 armhf 0.2.13-3build1 [15.7 kB] 213s Get:14 http://ftpmaster.internal/ubuntu plucky/main armhf libdeflate0 armhf 1.23-1 [38.5 kB] 213s Get:15 http://ftpmaster.internal/ubuntu plucky/main armhf libgfortran5 armhf 15-20250222-0ubuntu1 [330 kB] 214s Get:16 http://ftpmaster.internal/ubuntu plucky/main armhf libgomp1 armhf 15-20250222-0ubuntu1 [128 kB] 214s Get:17 http://ftpmaster.internal/ubuntu plucky/main armhf libgraphite2-3 armhf 1.3.14-2ubuntu1 [64.8 kB] 214s Get:18 http://ftpmaster.internal/ubuntu plucky/main armhf libharfbuzz0b armhf 10.2.0-1 [464 kB] 215s Get:19 http://ftpmaster.internal/ubuntu plucky/main armhf x11-common all 1:7.7+23ubuntu3 [21.7 kB] 215s Get:20 http://ftpmaster.internal/ubuntu plucky/main armhf libice6 armhf 2:1.1.1-1 [36.5 kB] 215s Get:21 http://ftpmaster.internal/ubuntu plucky/main armhf libjpeg-turbo8 armhf 2.1.5-3ubuntu2 [127 kB] 215s Get:22 http://ftpmaster.internal/ubuntu plucky/main armhf libjpeg8 armhf 8c-2ubuntu11 [2148 B] 215s Get:23 http://ftpmaster.internal/ubuntu plucky/main armhf liblapack3 armhf 3.12.1-2 [2091 kB] 219s Get:24 http://ftpmaster.internal/ubuntu plucky/main armhf liblerc4 armhf 4.0.0+ds-5ubuntu1 [160 kB] 220s Get:25 http://ftpmaster.internal/ubuntu plucky/main armhf libthai-data all 0.1.29-2build1 [158 kB] 220s Get:26 http://ftpmaster.internal/ubuntu plucky/main armhf libthai0 armhf 0.1.29-2build1 [15.2 kB] 220s Get:27 http://ftpmaster.internal/ubuntu plucky/main armhf libpango-1.0-0 armhf 1.56.2-1 [216 kB] 221s Get:28 http://ftpmaster.internal/ubuntu plucky/main armhf libpangoft2-1.0-0 armhf 1.56.2-1 [43.6 kB] 221s Get:29 http://ftpmaster.internal/ubuntu plucky/main armhf libpangocairo-1.0-0 armhf 1.56.2-1 [25.1 kB] 221s Get:30 http://ftpmaster.internal/ubuntu plucky/main armhf libpaper2 armhf 2.2.5-0.3 [16.3 kB] 221s Get:31 http://ftpmaster.internal/ubuntu plucky/main armhf libpaper-utils armhf 2.2.5-0.3 [14.2 kB] 221s Get:32 http://ftpmaster.internal/ubuntu plucky/main armhf libsharpyuv0 armhf 1.5.0-0.1 [16.4 kB] 221s Get:33 http://ftpmaster.internal/ubuntu plucky/main armhf libsm6 armhf 2:1.2.4-1 [15.1 kB] 221s Get:34 http://ftpmaster.internal/ubuntu plucky/main armhf libtcl8.6 armhf 8.6.16+dfsg-1 [909 kB] 223s Get:35 http://ftpmaster.internal/ubuntu plucky/main armhf libjbig0 armhf 2.1-6.1ubuntu2 [24.9 kB] 223s Get:36 http://ftpmaster.internal/ubuntu plucky/main armhf libwebp7 armhf 1.5.0-0.1 [188 kB] 223s Get:37 http://ftpmaster.internal/ubuntu plucky/main armhf libtiff6 armhf 4.5.1+git230720-4ubuntu4 [179 kB] 223s Get:38 http://ftpmaster.internal/ubuntu plucky/main armhf libxft2 armhf 2.3.6-1build1 [37.4 kB] 223s Get:39 http://ftpmaster.internal/ubuntu plucky/main armhf libxss1 armhf 1:1.2.3-1build3 [6500 B] 223s Get:40 http://ftpmaster.internal/ubuntu plucky/main armhf libtk8.6 armhf 8.6.16-1 [686 kB] 224s Get:41 http://ftpmaster.internal/ubuntu plucky/main armhf libxt6t64 armhf 1:1.2.1-1.2build1 [145 kB] 225s Get:42 http://ftpmaster.internal/ubuntu plucky/main armhf zip armhf 3.0-14ubuntu2 [164 kB] 225s Get:43 http://ftpmaster.internal/ubuntu plucky/main armhf unzip armhf 6.0-28ubuntu6 [167 kB] 225s Get:44 http://ftpmaster.internal/ubuntu plucky/main armhf xdg-utils all 1.2.1-2ubuntu1 [66.0 kB] 225s Get:45 http://ftpmaster.internal/ubuntu plucky/universe armhf r-base-core armhf 4.4.3-1 [28.2 MB] 276s Get:46 http://ftpmaster.internal/ubuntu plucky/universe armhf r-cran-lattice armhf 0.22-6-1 [1363 kB] 278s Get:47 http://ftpmaster.internal/ubuntu plucky/universe armhf r-cran-matrix armhf 1.7-3-1 [4039 kB] 285s Get:48 http://ftpmaster.internal/ubuntu plucky/universe armhf r-cran-expm armhf 1.0-0-1 [223 kB] 285s Get:49 http://ftpmaster.internal/ubuntu plucky/universe armhf r-cran-gmp armhf 0.7-5-1 [299 kB] 286s Get:50 http://ftpmaster.internal/ubuntu plucky/universe armhf r-cran-rcolorbrewer all 1.1-3-1build1 [55.4 kB] 286s Get:51 http://ftpmaster.internal/ubuntu plucky/universe armhf r-cran-rmpfr armhf 0.9-5-1 [1219 kB] 288s Get:52 http://ftpmaster.internal/ubuntu plucky/universe armhf r-cran-sfsmisc all 1.1-20-1 [674 kB] 290s Preconfiguring packages ... 290s Fetched 45.5 MB in 1min 21s (558 kB/s) 290s Selecting previously unselected package libfreetype6:armhf. 290s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 64655 files and directories currently installed.) 290s Preparing to unpack .../00-libfreetype6_2.13.3+dfsg-1_armhf.deb ... 290s Unpacking libfreetype6:armhf (2.13.3+dfsg-1) ... 290s Selecting previously unselected package fonts-dejavu-mono. 290s Preparing to unpack .../01-fonts-dejavu-mono_2.37-8_all.deb ... 290s Unpacking fonts-dejavu-mono (2.37-8) ... 290s Selecting previously unselected package fonts-dejavu-core. 290s Preparing to unpack .../02-fonts-dejavu-core_2.37-8_all.deb ... 290s Unpacking fonts-dejavu-core (2.37-8) ... 290s Selecting previously unselected package fontconfig-config. 290s Preparing to unpack .../03-fontconfig-config_2.15.0-2ubuntu1_armhf.deb ... 290s Unpacking fontconfig-config (2.15.0-2ubuntu1) ... 290s Selecting previously unselected package libfontconfig1:armhf. 290s Preparing to unpack .../04-libfontconfig1_2.15.0-2ubuntu1_armhf.deb ... 290s Unpacking libfontconfig1:armhf (2.15.0-2ubuntu1) ... 290s Selecting previously unselected package fontconfig. 290s Preparing to unpack .../05-fontconfig_2.15.0-2ubuntu1_armhf.deb ... 290s Unpacking fontconfig (2.15.0-2ubuntu1) ... 290s Selecting previously unselected package libblas3:armhf. 291s Preparing to unpack .../06-libblas3_3.12.1-2_armhf.deb ... 291s Unpacking libblas3:armhf (3.12.1-2) ... 291s Selecting previously unselected package libpixman-1-0:armhf. 291s Preparing to unpack .../07-libpixman-1-0_0.44.0-3_armhf.deb ... 291s Unpacking libpixman-1-0:armhf (0.44.0-3) ... 291s Selecting previously unselected package libxcb-render0:armhf. 291s Preparing to unpack .../08-libxcb-render0_1.17.0-2_armhf.deb ... 291s Unpacking libxcb-render0:armhf (1.17.0-2) ... 291s Selecting previously unselected package libxcb-shm0:armhf. 291s Preparing to unpack .../09-libxcb-shm0_1.17.0-2_armhf.deb ... 291s Unpacking libxcb-shm0:armhf (1.17.0-2) ... 291s Selecting previously unselected package libxrender1:armhf. 291s Preparing to unpack .../10-libxrender1_1%3a0.9.10-1.1build1_armhf.deb ... 291s Unpacking libxrender1:armhf (1:0.9.10-1.1build1) ... 291s Selecting previously unselected package libcairo2:armhf. 291s Preparing to unpack .../11-libcairo2_1.18.2-2_armhf.deb ... 291s Unpacking libcairo2:armhf (1.18.2-2) ... 291s Selecting previously unselected package libdatrie1:armhf. 291s Preparing to unpack .../12-libdatrie1_0.2.13-3build1_armhf.deb ... 291s Unpacking libdatrie1:armhf (0.2.13-3build1) ... 291s Selecting previously unselected package libdeflate0:armhf. 291s Preparing to unpack .../13-libdeflate0_1.23-1_armhf.deb ... 291s Unpacking libdeflate0:armhf (1.23-1) ... 291s Selecting previously unselected package libgfortran5:armhf. 291s Preparing to unpack .../14-libgfortran5_15-20250222-0ubuntu1_armhf.deb ... 291s Unpacking libgfortran5:armhf (15-20250222-0ubuntu1) ... 291s Selecting previously unselected package libgomp1:armhf. 291s Preparing to unpack .../15-libgomp1_15-20250222-0ubuntu1_armhf.deb ... 291s Unpacking libgomp1:armhf (15-20250222-0ubuntu1) ... 291s Selecting previously unselected package libgraphite2-3:armhf. 291s Preparing to unpack .../16-libgraphite2-3_1.3.14-2ubuntu1_armhf.deb ... 291s Unpacking libgraphite2-3:armhf (1.3.14-2ubuntu1) ... 291s Selecting previously unselected package libharfbuzz0b:armhf. 291s Preparing to unpack .../17-libharfbuzz0b_10.2.0-1_armhf.deb ... 291s Unpacking libharfbuzz0b:armhf (10.2.0-1) ... 291s Selecting previously unselected package x11-common. 291s Preparing to unpack .../18-x11-common_1%3a7.7+23ubuntu3_all.deb ... 291s Unpacking x11-common (1:7.7+23ubuntu3) ... 291s Selecting previously unselected package libice6:armhf. 291s Preparing to unpack .../19-libice6_2%3a1.1.1-1_armhf.deb ... 291s Unpacking libice6:armhf (2:1.1.1-1) ... 291s Selecting previously unselected package libjpeg-turbo8:armhf. 291s Preparing to unpack .../20-libjpeg-turbo8_2.1.5-3ubuntu2_armhf.deb ... 291s Unpacking libjpeg-turbo8:armhf (2.1.5-3ubuntu2) ... 291s Selecting previously unselected package libjpeg8:armhf. 291s Preparing to unpack .../21-libjpeg8_8c-2ubuntu11_armhf.deb ... 291s Unpacking libjpeg8:armhf (8c-2ubuntu11) ... 291s Selecting previously unselected package liblapack3:armhf. 291s Preparing to unpack .../22-liblapack3_3.12.1-2_armhf.deb ... 291s Unpacking liblapack3:armhf (3.12.1-2) ... 291s Selecting previously unselected package liblerc4:armhf. 291s Preparing to unpack .../23-liblerc4_4.0.0+ds-5ubuntu1_armhf.deb ... 291s Unpacking liblerc4:armhf (4.0.0+ds-5ubuntu1) ... 291s Selecting previously unselected package libthai-data. 291s Preparing to unpack .../24-libthai-data_0.1.29-2build1_all.deb ... 291s Unpacking libthai-data (0.1.29-2build1) ... 291s Selecting previously unselected package libthai0:armhf. 291s Preparing to unpack .../25-libthai0_0.1.29-2build1_armhf.deb ... 291s Unpacking libthai0:armhf (0.1.29-2build1) ... 291s Selecting previously unselected package libpango-1.0-0:armhf. 291s Preparing to unpack .../26-libpango-1.0-0_1.56.2-1_armhf.deb ... 291s Unpacking libpango-1.0-0:armhf (1.56.2-1) ... 291s Selecting previously unselected package libpangoft2-1.0-0:armhf. 291s Preparing to unpack .../27-libpangoft2-1.0-0_1.56.2-1_armhf.deb ... 291s Unpacking libpangoft2-1.0-0:armhf (1.56.2-1) ... 291s Selecting previously unselected package libpangocairo-1.0-0:armhf. 291s Preparing to unpack .../28-libpangocairo-1.0-0_1.56.2-1_armhf.deb ... 291s Unpacking libpangocairo-1.0-0:armhf (1.56.2-1) ... 291s Selecting previously unselected package libpaper2:armhf. 291s Preparing to unpack .../29-libpaper2_2.2.5-0.3_armhf.deb ... 291s Unpacking libpaper2:armhf (2.2.5-0.3) ... 292s Selecting previously unselected package libpaper-utils. 292s Preparing to unpack .../30-libpaper-utils_2.2.5-0.3_armhf.deb ... 292s Unpacking libpaper-utils (2.2.5-0.3) ... 292s Selecting previously unselected package libsharpyuv0:armhf. 292s Preparing to unpack .../31-libsharpyuv0_1.5.0-0.1_armhf.deb ... 292s Unpacking libsharpyuv0:armhf (1.5.0-0.1) ... 292s Selecting previously unselected package libsm6:armhf. 292s Preparing to unpack .../32-libsm6_2%3a1.2.4-1_armhf.deb ... 292s Unpacking libsm6:armhf (2:1.2.4-1) ... 292s Selecting previously unselected package libtcl8.6:armhf. 292s Preparing to unpack .../33-libtcl8.6_8.6.16+dfsg-1_armhf.deb ... 292s Unpacking libtcl8.6:armhf (8.6.16+dfsg-1) ... 292s Selecting previously unselected package libjbig0:armhf. 292s Preparing to unpack .../34-libjbig0_2.1-6.1ubuntu2_armhf.deb ... 292s Unpacking libjbig0:armhf (2.1-6.1ubuntu2) ... 292s Selecting previously unselected package libwebp7:armhf. 292s Preparing to unpack .../35-libwebp7_1.5.0-0.1_armhf.deb ... 292s Unpacking libwebp7:armhf (1.5.0-0.1) ... 292s Selecting previously unselected package libtiff6:armhf. 292s Preparing to unpack .../36-libtiff6_4.5.1+git230720-4ubuntu4_armhf.deb ... 292s Unpacking libtiff6:armhf (4.5.1+git230720-4ubuntu4) ... 292s Selecting previously unselected package libxft2:armhf. 292s Preparing to unpack .../37-libxft2_2.3.6-1build1_armhf.deb ... 292s Unpacking libxft2:armhf (2.3.6-1build1) ... 292s Selecting previously unselected package libxss1:armhf. 292s Preparing to unpack .../38-libxss1_1%3a1.2.3-1build3_armhf.deb ... 292s Unpacking libxss1:armhf (1:1.2.3-1build3) ... 292s Selecting previously unselected package libtk8.6:armhf. 292s Preparing to unpack .../39-libtk8.6_8.6.16-1_armhf.deb ... 292s Unpacking libtk8.6:armhf (8.6.16-1) ... 292s Selecting previously unselected package libxt6t64:armhf. 292s Preparing to unpack .../40-libxt6t64_1%3a1.2.1-1.2build1_armhf.deb ... 292s Unpacking libxt6t64:armhf (1:1.2.1-1.2build1) ... 292s Selecting previously unselected package zip. 292s Preparing to unpack .../41-zip_3.0-14ubuntu2_armhf.deb ... 292s Unpacking zip (3.0-14ubuntu2) ... 292s Selecting previously unselected package unzip. 292s Preparing to unpack .../42-unzip_6.0-28ubuntu6_armhf.deb ... 292s Unpacking unzip (6.0-28ubuntu6) ... 292s Selecting previously unselected package xdg-utils. 292s Preparing to unpack .../43-xdg-utils_1.2.1-2ubuntu1_all.deb ... 292s Unpacking xdg-utils (1.2.1-2ubuntu1) ... 292s Selecting previously unselected package r-base-core. 292s Preparing to unpack .../44-r-base-core_4.4.3-1_armhf.deb ... 292s Unpacking r-base-core (4.4.3-1) ... 293s Selecting previously unselected package r-cran-lattice. 293s Preparing to unpack .../45-r-cran-lattice_0.22-6-1_armhf.deb ... 293s Unpacking r-cran-lattice (0.22-6-1) ... 293s Selecting previously unselected package r-cran-matrix. 293s Preparing to unpack .../46-r-cran-matrix_1.7-3-1_armhf.deb ... 293s Unpacking r-cran-matrix (1.7-3-1) ... 293s Selecting previously unselected package r-cran-expm. 293s Preparing to unpack .../47-r-cran-expm_1.0-0-1_armhf.deb ... 293s Unpacking r-cran-expm (1.0-0-1) ... 293s Selecting previously unselected package r-cran-gmp. 293s Preparing to unpack .../48-r-cran-gmp_0.7-5-1_armhf.deb ... 293s Unpacking r-cran-gmp (0.7-5-1) ... 293s Selecting previously unselected package r-cran-rcolorbrewer. 293s Preparing to unpack .../49-r-cran-rcolorbrewer_1.1-3-1build1_all.deb ... 293s Unpacking r-cran-rcolorbrewer (1.1-3-1build1) ... 293s Selecting previously unselected package r-cran-rmpfr. 293s Preparing to unpack .../50-r-cran-rmpfr_0.9-5-1_armhf.deb ... 293s Unpacking r-cran-rmpfr (0.9-5-1) ... 293s Selecting previously unselected package r-cran-sfsmisc. 293s Preparing to unpack .../51-r-cran-sfsmisc_1.1-20-1_all.deb ... 293s Unpacking r-cran-sfsmisc (1.1-20-1) ... 293s Setting up libgraphite2-3:armhf (1.3.14-2ubuntu1) ... 293s Setting up libpixman-1-0:armhf (0.44.0-3) ... 293s Setting up libsharpyuv0:armhf (1.5.0-0.1) ... 293s Setting up liblerc4:armhf (4.0.0+ds-5ubuntu1) ... 293s Setting up libxrender1:armhf (1:0.9.10-1.1build1) ... 293s Setting up libdatrie1:armhf (0.2.13-3build1) ... 293s Setting up libxcb-render0:armhf (1.17.0-2) ... 293s Setting up unzip (6.0-28ubuntu6) ... 293s Setting up x11-common (1:7.7+23ubuntu3) ... 293s Setting up libdeflate0:armhf (1.23-1) ... 293s Setting up libxcb-shm0:armhf (1.17.0-2) ... 293s Setting up libgomp1:armhf (15-20250222-0ubuntu1) ... 293s Setting up libjbig0:armhf (2.1-6.1ubuntu2) ... 293s Setting up zip (3.0-14ubuntu2) ... 293s Setting up libblas3:armhf (3.12.1-2) ... 293s update-alternatives: using /usr/lib/arm-linux-gnueabihf/blas/libblas.so.3 to provide /usr/lib/arm-linux-gnueabihf/libblas.so.3 (libblas.so.3-arm-linux-gnueabihf) in auto mode 293s Setting up libfreetype6:armhf (2.13.3+dfsg-1) ... 293s Setting up fonts-dejavu-mono (2.37-8) ... 293s Setting up libtcl8.6:armhf (8.6.16+dfsg-1) ... 293s Setting up fonts-dejavu-core (2.37-8) ... 293s Setting up libjpeg-turbo8:armhf (2.1.5-3ubuntu2) ... 293s Setting up libgfortran5:armhf (15-20250222-0ubuntu1) ... 293s Setting up libwebp7:armhf (1.5.0-0.1) ... 293s Setting up libharfbuzz0b:armhf (10.2.0-1) ... 293s Setting up libthai-data (0.1.29-2build1) ... 293s Setting up libxss1:armhf (1:1.2.3-1build3) ... 293s Setting up libpaper2:armhf (2.2.5-0.3) ... 293s Setting up xdg-utils (1.2.1-2ubuntu1) ... 293s update-alternatives: using /usr/bin/xdg-open to provide /usr/bin/open (open) in auto mode 293s Setting up libjpeg8:armhf (8c-2ubuntu11) ... 293s Setting up libice6:armhf (2:1.1.1-1) ... 293s Setting up liblapack3:armhf (3.12.1-2) ... 293s update-alternatives: using /usr/lib/arm-linux-gnueabihf/lapack/liblapack.so.3 to provide /usr/lib/arm-linux-gnueabihf/liblapack.so.3 (liblapack.so.3-arm-linux-gnueabihf) in auto mode 293s Setting up fontconfig-config (2.15.0-2ubuntu1) ... 294s Setting up libpaper-utils (2.2.5-0.3) ... 294s Setting up libthai0:armhf (0.1.29-2build1) ... 294s Setting up libtiff6:armhf (4.5.1+git230720-4ubuntu4) ... 294s Setting up libfontconfig1:armhf (2.15.0-2ubuntu1) ... 294s Setting up libsm6:armhf (2:1.2.4-1) ... 294s Setting up fontconfig (2.15.0-2ubuntu1) ... 296s Regenerating fonts cache... done. 296s Setting up libxft2:armhf (2.3.6-1build1) ... 296s Setting up libtk8.6:armhf (8.6.16-1) ... 296s Setting up libpango-1.0-0:armhf (1.56.2-1) ... 296s Setting up libcairo2:armhf (1.18.2-2) ... 296s Setting up libxt6t64:armhf (1:1.2.1-1.2build1) ... 296s Setting up libpangoft2-1.0-0:armhf (1.56.2-1) ... 296s Setting up libpangocairo-1.0-0:armhf (1.56.2-1) ... 296s Setting up r-base-core (4.4.3-1) ... 296s Creating config file /etc/R/Renviron with new version 296s Setting up r-cran-lattice (0.22-6-1) ... 296s Setting up r-cran-gmp (0.7-5-1) ... 296s Setting up r-cran-sfsmisc (1.1-20-1) ... 296s Setting up r-cran-rcolorbrewer (1.1-3-1build1) ... 296s Setting up r-cran-matrix (1.7-3-1) ... 296s Setting up r-cran-rmpfr (0.9-5-1) ... 296s Setting up r-cran-expm (1.0-0-1) ... 296s Processing triggers for install-info (7.1.1-1) ... 296s Processing triggers for libc-bin (2.41-1ubuntu2) ... 296s Processing triggers for man-db (2.13.0-1) ... 304s autopkgtest [16:11:17]: test run-unit-test: [----------------------- 306s 306s R version 4.4.3 (2025-02-28) -- "Trophy Case" 306s Copyright (C) 2025 The R Foundation for Statistical Computing 306s Platform: arm-unknown-linux-gnueabihf (32-bit) 306s 306s R is free software and comes with ABSOLUTELY NO WARRANTY. 306s You are welcome to redistribute it under certain conditions. 306s Type 'license()' or 'licence()' for distribution details. 306s 306s R is a collaborative project with many contributors. 306s Type 'contributors()' for more information and 306s 'citation()' on how to cite R or R packages in publications. 306s 306s Type 'demo()' for some demos, 'help()' for on-line help, or 306s 'help.start()' for an HTML browser interface to help. 306s Type 'q()' to quit R. 306s 306s > library(expm) 306s Loading required package: Matrix 307s 307s Attaching package: ‘expm’ 307s 307s The following object is masked from ‘package:Matrix’: 307s 307s expm 307s 307s > 307s > source(system.file("test-tools.R", package= "expm"), keep.source=FALSE)# relErr() 307s Loading required package: tools 307s > 307s > set.seed(101) 307s > for(n in c(1:5, 10:11, if(doExtras) 100:101 else 25)) { 307s + cat("n = ",n,"\n-----\n") 307s + for(i in seq_len(if(doExtras)10 else 3)) { 307s + A <- matrix(round(10*rnorm(n^2))/4, n,n) 307s + E <- matrix(rnorm(n^2, sd = 1e-3), n,n) 307s + F1 <- expmFrechet(A, E) 307s + F2 <- expmFrechet(A, E, "block") 307s + if(i == 1 && n < 9) print(F1) 307s + stopifnot(all.equal(F1, F2, tol = 6e-15 * n)) 307s + cat(sprintf("%5.2f ", relErr(F1 $ L, F2 $ L) * 2^52)) 307s + } 307s + cat(" * eps_C \n") 307s + } 308s n = 1 308s ----- 308s $expm 308s [,1] 308s [1,] 0.4723666 308s 308s $Lexpm 308s [,1] 308s [1,] 0.0002609645 308s 308s 0.00 0.00 0.00 * eps_C 308s n = 2 308s ----- 308s $expm 308s [,1] [,2] 308s [1,] 3.7943192 3.9860952 308s [2,] -0.4428995 0.2511234 308s 308s $Lexpm 308s [,1] [,2] 308s [1,] -0.000196749 0.0005570041 308s [2,] -0.001188989 -0.0019747694 308s 308s 2.27 1.51 2.97 * eps_C 308s n = 3 308s ----- 308s $expm 308s [,1] [,2] [,3] 308s [1,] -13.234401 -7.815106 -5.911481 308s [2,] 3.475001 -14.396109 -2.922287 308s [3,] -4.792555 -3.230410 -2.237135 308s 308s $Lexpm 308s [,1] [,2] [,3] 308s [1,] -0.006244373 0.03825617 0.006773883 308s [2,] -0.009314389 -0.01048467 -0.005528605 308s [3,] -0.003071235 0.01362774 0.002137511 308s 308s 3.85 7.21 6.22 * eps_C 308s n = 4 308s ----- 308s $expm 308s [,1] [,2] [,3] [,4] 308s [1,] 0.2707319 -0.1626405 -2.119235 -0.07861206 308s [2,] 2.0900646 -0.7912464 -14.169394 -0.17449996 308s [3,] 6.3895316 12.2833412 -18.789145 6.32147099 308s [4,] -2.2731287 -5.9125055 4.417767 -2.96095147 308s 308s $Lexpm 308s [,1] [,2] [,3] [,4] 308s [1,] 7.677032e-05 0.001682315 -0.0008184674 0.0009526274 308s [2,] -1.662466e-03 0.009155436 0.0057316462 0.0050790835 308s [3,] -4.184527e-03 -0.001231147 0.0132157465 0.0025368226 308s [4,] -4.704290e-04 0.000236295 0.0019512119 -0.0013450671 308s 308s 4.21 7.84 0.57 * eps_C 308s n = 5 308s ----- 308s $expm 308s [,1] [,2] [,3] [,4] [,5] 308s [1,] 28.89025 -7.887859 -5.470599 0.5944806 9.342582 308s [2,] 13.49317 -13.253465 34.703223 31.9553150 -3.493428 308s [3,] 77.39341 -41.002709 78.782028 79.2962299 5.522557 308s [4,] 32.49178 -16.213884 20.464336 23.6511224 4.510920 308s [5,] -41.22584 20.972736 -29.288624 -33.2428425 -5.776531 308s 308s $Lexpm 308s [,1] [,2] [,3] [,4] [,5] 308s [1,] 0.056099069 -0.036816360 0.09881220 0.086689105 -0.0230892952 308s [2,] -0.022878412 0.028215505 -0.04468039 -0.041094058 0.0005738551 308s [3,] 0.047797873 -0.004093659 0.09600680 0.079920949 -0.0371636943 308s [4,] 0.022749004 -0.006615176 0.04445098 0.036856490 -0.0189132368 308s [5,] 0.004190808 -0.010861707 -0.01759342 -0.008662979 0.0249103378 308s 308s 4.75 2.83 2.87 * eps_C 308s n = 10 308s ----- 308s 3.13 4.72 2.42 * eps_C 308s n = 11 308s ----- 308s 3.28 3.60 3.22 * eps_C 308s n = 25 308s ----- 308s 4.08 6.25 4.37 * eps_C 308s > 308s > cat('Time elapsed: ', proc.time(), '\n') # for "statistical reasons" 308s Time elapsed: 1.217 0.118 1.337 0.002 0.008 308s > 308s 308s R version 4.4.3 (2025-02-28) -- "Trophy Case" 308s Copyright (C) 2025 The R Foundation for Statistical Computing 308s Platform: arm-unknown-linux-gnueabihf (32-bit) 308s 308s R is free software and comes with ABSOLUTELY NO WARRANTY. 308s You are welcome to redistribute it under certain conditions. 308s Type 'license()' or 'licence()' for distribution details. 308s 308s R is a collaborative project with many contributors. 308s Type 'contributors()' for more information and 308s 'citation()' on how to cite R or R packages in publications. 308s 308s Type 'demo()' for some demos, 'help()' for on-line help, or 308s 'help.start()' for an HTML browser interface to help. 308s Type 'q()' to quit R. 308s 308s > library(expm) 308s Loading required package: Matrix 309s > source(system.file("test-tools.R", package= "expm"), keep.source=FALSE)## -> assertError()... 309s 309s Attaching package: ‘expm’ 309s 309s The following object is masked from ‘package:Matrix’: 309s 309s expm 309s 309s Loading required package: tools 309s > 309s > ## A matrix with 'Inf' 309s > mI <- rbind(0, c(-Inf, Inf, 0, 0), 0, 0) 309s > bal3 <- 309s + list(dB = dgebal(mI, "B"), # = default 309s + dP = dgebal(mI, "P"), 309s + dN = dgebal(mI, "N")) 309s > str(bal3) 309s Warning messages: 309s 1: In dgebal(mI, "B") : 'dgebal' is deprecated. 309s Use 'balance' instead. 309s See help("Deprecated") 309s 2: In dgebal(mI, "P") : 'dgebal' is deprecated. 309s Use 'balance' instead. 309s See help("Deprecated") 309s 3: In dgebal(mI, "N") : 'dgebal' is deprecated. 309s Use 'balance' instead. 309s See help("Deprecated") 309s List of 3 309s $ dB:List of 4 309s ..$ z : num [1:4, 1:4] Inf 0 0 0 -Inf ... 309s ..$ scale: num [1:4] 1 1 3 4 309s ..$ i1 : int 1 309s ..$ i2 : int 1 309s Asserted error: R_dgebal(*, type="S"): Infinite matrix entry 309s $ dP:List of 4 309s ..$ z : num [1:4, 1:4] Inf 0 0 0 -Inf ... 309s ..$ scale: num [1:4] 1 1 3 4 309s ..$ i1 : int 1 309s ..$ i2 : int 1 309s $ dN:List of 4 309s ..$ z : num [1:4, 1:4] 0 -Inf 0 0 0 ... 309s ..$ scale: num [1:4] 1 1 1 1 309s ..$ i1 : int 1 309s ..$ i2 : int 4 309s > stopifnot(identical(mI, bal3$dN$z), 309s + with(bal3, all.equal(dB, dP, tol=1e-14)), 309s + all.equal(bal3$dB$z, rbind(c(Inf,-Inf,0,0), 0,0,0), tol=1e-14), 309s + all.equal(bal3$dB$scale, c(1,1,3,4))) 309s > assertError(dgebal(mI, "S"), verbose=TRUE)# gave infinite loop 309s > 309s > 309s > 309s > ## Compare the two different "balance" pre-conditioning versions in Ward77: 309s > set.seed(1) 309s > mList <- lapply(integer(100), function(...) rSpMatrix(20, nnz=80)) 309s > re20 <- sapply(mList, function(M) 309s + relErr(expm(M, precond = "2bal"), 309s + expm(M, precond = "1bal"))) 309s > re20 ## ahh.: zero or ~ 1e-13 ... good 309s [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 309s [38] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 309s [75] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 309s > table(re20 == 0) 309s 309s TRUE 309s 100 309s > summary(re20[re20 != 0]) 309s Min. 1st Qu. Median Mean 3rd Qu. Max. 309s 309s > ## Pentium M (ubuntu) 309s > ## Min. 1st Qu. Median Mean 3rd Qu. Max. 309s > ## 2.593e-14 8.703e-14 1.282e-13 2.434e-13 4.177e-13 6.295e-13 309s > 309s > demo(balanceTst) #-> the function definition and the first few examples 309s 309s 309s demo(balanceTst) 309s ---- ~~~~~~~~~~ 309s 309s > balanceTst <- function(A) { 309s + 309s + ## Purpose: Consistency checking of balance() {was "dgebal()"} 309s + ## ---------------------------------------------------------------------- 309s + ## Arguments: a square matrix 309s + ## ---------------------------------------------------------------------- 309s + ## Author: Martin Maechler, 20 Feb 2008 and on 309s + 309s + n <- dim(A)[1] 309s + ## do *the* three calls and look at result 309s + P <- balance(A, "P") 309s + 309s + doPerm <- function(A, pp, i1, i2) { 309s + stopifnot(length(pp) == n, dim(A) == c(n,n), 309s + 1 <= i1, i1 <= i2, i2 <= n) 309s + A. <- A 309s + if(i2 < n) { ## The upper part 309s + for(i in n:(i2+1)) { # 'p2' in *reverse* order 309s + ## swap i <-> pp[i] both rows and columns 309s + tt <- A.[,i]; A.[,i] <- A.[,pp[i]]; A.[,pp[i]] <- tt 309s + tt <- A.[i,]; A.[i,] <- A.[pp[i],]; A.[pp[i],] <- tt 309s + } 309s + } 309s + if(i1 > 1) { ## The lower part 309s + for(i in 1:(i1-1)) { # 'p1' in *forward* order 309s + tt <- A.[,i]; A.[,i] <- A.[,pp[i]]; A.[,pp[i]] <- tt 309s + tt <- A.[i,]; A.[i,] <- A.[pp[i],]; A.[pp[i],] <- tt 309s + } 309s + } 309s + A. 309s + } 309s + 309s + checkPerm <- function(P, orig.A) { 309s + didPerm <- ((leftP <- (i1 <- P$i1) != 1L) | 309s + (rightP <- (i2 <- P$i2) != n)) 309s + if(didPerm) { ## *had* permutation -- now check my idea about it 309s + pp <- as.integer(P$scale) 309s + ## Permute A to become P$z : 309s + A. <- doPerm(orig.A, pp = pp, i1=i1, i2=i2) 309s + stopifnot(isTRUE(all.equal(A., P$z, tolerance = 1e-15))) 309s + 309s + ## Now the reverse: Use pp[] and permute A. "back to A": 309s + if(leftP) { ## The lower part 309s + for(i in (i1-1):1) { # 'p1' in *reverse* order 309s + tt <- A.[,i]; A.[,i] <- A.[,pp[i]]; A.[,pp[i]] <- tt 309s + tt <- A.[i,]; A.[i,] <- A.[pp[i],]; A.[pp[i],] <- tt 309s + } 309s + } 309s + if(rightP) { ## The upper part 309s + for(i in (i2+1):n) { # 'p2' in *forward* order 309s + ## swap i <-> pp[i] both rows and columns 309s + tt <- A.[,i]; A.[,i] <- A.[,pp[i]]; A.[,pp[i]] <- tt 309s + tt <- A.[i,]; A.[i,] <- A.[pp[i],]; A.[pp[i],] <- tt 309s + } 309s + } 309s + stopifnot(isTRUE(all.equal(A., orig.A, tolerance = 1e-15))) 309s + } 309s + } 309s + checkPerm(P, orig.A = A) 309s + 309s + S <- balance(P$z, "S")# "S" starting from result of "P" 309s + stopifnot(S$i1 == 1, S$i2 == n) 309s + 309s + ## Now check the scaling 309s + checkScal <- function (d, A1, A2) { 309s + stopifnot(length(d) == n, dim(A1) == dim(A2), dim(A2) == c(n,n)) 309s + 309s + ## A.scaled <- diag(1/d, n) \%*\% A1 \%*\% diag(d, n) 309s + ## more efficiently: 309s + A.scaled <- A1 * (rep(d, each = n) / d) 309s + stopifnot(isTRUE(all.equal(A2, A.scaled, tolerance = 1e-15))) 309s + ## Check the reverse: 309s + S.rescaled <- A2 * (d * rep(1/d, each = n)) 309s + stopifnot(isTRUE(all.equal(A1, S.rescaled, tolerance = 1e-15))) 309s + } 309s + checkScal(d = S$scale, A1 = P$z, A2 = S$z) 309s + 309s + B <- balance(A, "B")# "B" : B[oth] 309s + stopifnot(P$i1 == B$i1, P$i2 == B$i2) 309s + ## now check *both* permutation and scaling 309s + 309s + A.perm <- doPerm(A, pp = as.integer(B$scale), i1=B$i1, i2=B$i2) 309s + ## checkPerm(B, orig.A = A) 309s + 309s + dB <- B$scale 309s + dB[c(if(B$i1 > 1) 1:(B$i1-1), 309s + if(B$i2 < n) (B$i2+1):n)] <- 1 309s + checkScal(d = dB, A1 = A.perm, A2 = B$z) 309s + 309s + ## return 309s + list(P = P, S = S, B = B, Sz.eq.Bz = isTRUE(all.equal(S$z, B$z))) 309s + } 309s 309s > m4. <- rbind(c(-1,-2, 0, 0), 309s + c( 0, 0,10,11), 309s + c( 0, 0,12, 0), 309s + c( 0,13, 0, 0)) 309s 309s > op <- options(str = strOptions(vec.len = 12)) 309s 309s > str(b4. <- balanceTst(m4.)) 309s List of 4 309s $ P :List of 4 309s ..$ z : num [1:4, 1:4] -1 0 0 0 -2 0 13 0 0 11 0 0 0 10 0 12 309s ..$ scale: num [1:4] 1 1 1 3 309s ..$ i1 : int 2 309s ..$ i2 : int 3 309s $ S :List of 4 309s ..$ z : num [1:4, 1:4] -1 0 0 0 -2 0 13 0 0 11 0 0 0 10 0 12 309s ..$ scale: num [1:4] 1 1 1 1 309s ..$ i1 : int 1 309s ..$ i2 : int 4 309s $ B :List of 4 309s ..$ z : num [1:4, 1:4] -1 0 0 0 -2 0 13 0 0 11 0 0 0 10 0 12 309s ..$ scale: num [1:4] 1 1 1 3 309s ..$ i1 : int 2 309s ..$ i2 : int 3 309s $ Sz.eq.Bz: logi TRUE 309s 309s > with(b4., all.equal(P, B)) # TRUE (everywhere?) 309s [1] TRUE 309s 309s > ## better (?) example 309s > (m <- matrix(c(0,-1,0,-2,10, rep(0,11)), 4,4)) 309s [,1] [,2] [,3] [,4] 309s [1,] 0 10 0 0 309s [2,] -1 0 0 0 309s [3,] 0 0 0 0 309s [4,] -2 0 0 0 309s 309s > str(ba <- balanceTst(m)) 309s List of 4 309s $ P :List of 4 309s ..$ z : num [1:4, 1:4] 0 0 0 0 0 0 10 0 -2 -1 0 0 0 0 0 0 309s ..$ scale: num [1:4] 3 1 1 3 309s ..$ i1 : int 2 309s ..$ i2 : int 3 309s $ S :List of 4 309s ..$ z : num [1:4, 1:4] 0 0 0 0 0 0 2.5 0 -2 -4 0 0 0 0 0 0 309s ..$ scale: num [1:4] 1 0.25 1 1 309s ..$ i1 : int 1 309s ..$ i2 : int 4 309s $ B :List of 4 309s ..$ z : num [1:4, 1:4] 0 0 0 0 0 0 2.5 0 -2 -4 0 0 0 0 0 0 309s ..$ scale: num [1:4] 3 0.25 1 3 309s ..$ i1 : int 2 309s ..$ i2 : int 3 309s $ Sz.eq.Bz: logi TRUE 309s 309s > (eq <- with(ba, all.equal(S$z, B$z))) # TRUE now (everywhere?) 309s [1] TRUE 309s 309s > ba$Sz.eq.Bz # ditto 309s [1] TRUE 309s 309s > ## a non-empty ``less-balanced'' example --- 309s > 309s > m4 <- matrix(outer(2^(0:7),c(-1,1)), 4,4) 309s 309s > m4[lower.tri(m4)] <- 0 #--> upper triangular ==> will have many permutations 309s 309s > ## now permute it; so balance() will find the permutation 309s > p <- c(4,2:1,3); m4 <- m4[p,p] 309s 309s > m4 309s [,1] [,2] [,3] [,4] 309s [1,] 128 0 0 0 309s [2,] 32 -32 0 2 309s [3,] 16 -16 -1 1 309s [4,] 64 0 0 4 309s 309s > str(dm4 <- balanceTst(m4)) # much permutation! i1 = i2 = 1 ! 309s List of 4 309s $ P :List of 4 309s ..$ z : num [1:4, 1:4] -1 0 0 0 -16 -32 0 0 1 2 4 0 16 32 64 128 309s ..$ scale: num [1:4] 1 2 1 1 309s ..$ i1 : int 1 309s ..$ i2 : int 1 309s $ S :List of 4 309s ..$ z : num [1:4, 1:4] -1 0 0 0 -1 -32 0 0 0.25 8 4 0 1 32 16 128 309s ..$ scale: num [1:4] 16 1 4 1 309s ..$ i1 : int 1 309s ..$ i2 : int 4 309s $ B :List of 4 309s ..$ z : num [1:4, 1:4] -1 0 0 0 -16 -32 0 0 1 2 4 0 16 32 64 128 309s ..$ scale: num [1:4] 1 2 1 1 309s ..$ i1 : int 1 309s ..$ i2 : int 1 309s $ Sz.eq.Bz: logi FALSE 309s 309s > ##----------- Complex examples 309s > zba4 <- balanceTst(m4 + 3i * m4) 309s 309s > str(zba4) 309s List of 4 309s $ P :List of 4 309s ..$ z : cplx [1:4, 1:4] -1-3i 0+0i 0+0i 0+0i -16-48i -32-96i 0+0i 0+0i 1+3i ... 309s ..$ scale: num [1:4] 1 2 1 1 309s ..$ i1 : int 1 309s ..$ i2 : int 1 309s $ S :List of 4 309s ..$ z : cplx [1:4, 1:4] -1-3i 0+0i 0+0i 0+0i -1-3i -32-96i 0+0i 0+0i 0.25+0.75i ... 309s ..$ scale: num [1:4] 16 1 4 1 309s ..$ i1 : int 1 309s ..$ i2 : int 4 309s $ B :List of 4 309s ..$ z : cplx [1:4, 1:4] -1-3i 0+0i 0+0i 0+0i -16-48i -32-96i 0+0i 0+0i 1+3i ... 309s ..$ scale: num [1:4] 1 2 1 1 309s ..$ i1 : int 1 309s ..$ i2 : int 1 309s $ Sz.eq.Bz: logi FALSE 309s 309s > zba <- balanceTst(m*(1 + 1i)) 309s 309s > str(zba) 309s List of 4 309s $ P :List of 4 309s ..$ z : cplx [1:4, 1:4] 0+0i 0+0i 0+0i 0+0i 0+0i 0+0i 10+10i 0+0i -2-2i ... 309s ..$ scale: num [1:4] 3 1 1 3 309s ..$ i1 : int 2 309s ..$ i2 : int 3 309s $ S :List of 4 309s ..$ z : cplx [1:4, 1:4] 0+0i 0+0i 0+0i 0+0i 0+0i 0+0i 2.5+2.5i 0+0i -2-2i ... 309s ..$ scale: num [1:4] 1 0.25 1 1 309s ..$ i1 : int 1 309s ..$ i2 : int 4 309s $ B :List of 4 309s ..$ z : cplx [1:4, 1:4] 0+0i 0+0i 0+0i 0+0i 0+0i 0+0i 2.5+2.5i 0+0i -2-2i ... 309s ..$ scale: num [1:4] 3 0.25 1 3 309s ..$ i1 : int 2 309s ..$ i2 : int 3 309s $ Sz.eq.Bz: logi TRUE 309s 309s > stopifnot(exprs = { 309s + all.equal(ba$ S$z, Re(zba$ S$z)) 309s + all.equal(ba$ S$z, Im(zba$ S$z)) 309s + all.equal(dm4$ S$z, Re(zba4$ S$z)) 309s + all.equal(dm4$ S$z * 3, Im(zba4$ S$z)) 309s + }) 309s 309s > options(op) # revert 309s > ## ========== 309s > 309s > dm4. <- dgebal(m4) 309s > storage.mode(m4) <- "integer" 309s > stopifnot(identical(dm4., dgebal(m4))) 309s > 309s > expm(m) 309s [,1] [,2] [,3] [,4] 309s [1,] -0.999786073 -0.06540707 0 0 309s [2,] 0.006540707 -0.99978607 0 0 309s [3,] 0.000000000 0.00000000 1 0 309s [4,] 0.013081414 -3.99957215 0 1 309s Warning message: 309s In dgebal(m4) : 'dgebal' is deprecated. 309s Use 'balance' instead. 309s See help("Deprecated") 309s Warning message: 309s In dgebal(m4) : 'dgebal' is deprecated. 309s Use 'balance' instead. 309s See help("Deprecated") 309s > expm(m,"Pade") ## are different indeed {when bug still existed} 309s [,1] [,2] [,3] [,4] 309s [1,] -0.999786073 -0.06540707 0 0 309s [2,] 0.006540707 -0.99978607 0 0 309s [3,] 0.000000000 0.00000000 1 0 309s [4,] 0.013081414 -3.99957215 0 1 309s attr(,"accuracy") 309s [1] 7.918807e-14 309s > expm(m,"R_Pade")# same as Pade 309s [,1] [,2] [,3] [,4] 309s [1,] -0.999786073 -0.06540707 0 0 309s [2,] 0.006540707 -0.99978607 0 0 309s [3,] 0.000000000 0.00000000 1 0 309s [4,] 0.013081414 -3.99957215 0 1 309s > 309s > 309s > ## a non-empty ``non-balanced'' example --- 309s > 309s > expm.t.identity(m4, "Ward") 309s [1] TRUE 309s > 309s > m6 <- zeroTrace(matrix(outer(2^(-8:9),c(-1,1)), 6,6)); m6 309s [,1] [,2] [,3] [,4] [,5] [,6] 309s [1,] -75.2584635 -0.25000 -16.0000 0.00390625 0.25000 16.0000 309s [2,] -0.0078125 -75.75456 -32.0000 0.00781250 0.50000 32.0000 309s [3,] -0.0156250 -1.00000 -139.2546 0.01562500 1.00000 64.0000 309s [4,] -0.0312500 -2.00000 -128.0000 -75.22330729 2.00000 128.0000 309s [5,] -0.0625000 -4.00000 -256.0000 0.06250000 -71.25456 256.0000 309s [6,] -0.1250000 -8.00000 -512.0000 0.12500000 8.00000 436.7454 309s > m6[lower.tri(m6)] <- 0 ## plus one non-zero 309s > m6[4,2] <- 77 309s > p <- c(6,4,5,2:1,3); m6 <- m6[p,p] 309s > expm.t.identity(m6, "Ward") ## difference; indeed 309s [1] TRUE 309s > expm(m6) # is very different from 309s [,1] [,2] [,3] [,4] [,5] 309s [1,] 4.743903e+189 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 309s [2,] 1.235301e+189 2.158311e-33 7.038631e-32 1.285266e-31 0.000000e+00 309s [3,] 2.390628e+189 0.000000e+00 1.133807e-31 0.000000e+00 0.000000e+00 309s [4,] 2.653829e+188 1.627057e-37 7.493870e-34 1.271561e-33 0.000000e+00 309s [5,] 1.326905e+188 8.096068e-38 3.743330e-34 -4.016897e-34 2.068543e-33 309s [6,] 5.312842e+188 5.266261e-37 1.683517e-33 3.098706e-35 0.000000e+00 309s [,6] 309s [1,] 0.000000e+00 309s [2,] -6.346149e-32 309s [3,] 0.000000e+00 309s [4,] -6.406872e-34 309s [5,] -3.187638e-34 309s [6,] -1.529642e-35 309s > expm(m6,"R_Pade") 309s [,1] [,2] [,3] [,4] [,5] 309s [1,] 4.743903e+189 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 309s [2,] 1.235301e+189 2.158311e-33 7.038631e-32 1.285266e-31 0.000000e+00 309s [3,] 2.390628e+189 0.000000e+00 1.133807e-31 0.000000e+00 0.000000e+00 309s [4,] 2.653829e+188 1.627057e-37 7.493870e-34 1.271561e-33 0.000000e+00 309s [5,] 1.326905e+188 8.096068e-38 3.743330e-34 -4.016897e-34 2.068543e-33 309s [6,] 5.312842e+188 5.266261e-37 1.683517e-33 3.098706e-35 0.000000e+00 309s [,6] 309s [1,] 0.000000e+00 309s [2,] -6.346149e-32 309s [3,] 0.000000e+00 309s [4,] -6.406872e-34 309s [5,] -3.187638e-34 309s [6,] -1.529642e-35 309s > 309s > str(dm6 <- balanceTst(m6)) 309s List of 4 309s $ P :List of 4 309s ..$ z : num [1:6, 1:6] -75.3 0 0 0 0 ... 309s ..$ scale: num [1:6] 3 1 1 1 3 1 309s ..$ i1 : int 2 309s ..$ i2 : int 4 309s $ S :List of 4 309s ..$ z : num [1:6, 1:6] -75.3 0 0 0 0 ... 309s ..$ scale: num [1:6] 1 1 1 1 2 1 309s ..$ i1 : int 1 309s ..$ i2 : int 6 309s $ B :List of 4 309s ..$ z : num [1:6, 1:6] -75.3 0 0 0 0 ... 309s ..$ scale: num [1:6] 3 1 1 1 3 1 309s ..$ i1 : int 2 309s ..$ i2 : int 4 309s $ Sz.eq.Bz: logi FALSE 309s > ## Now, that's interesting: 309s > ## 309s > ## 1. 'S' scales *more* (2 .. 5) than just (2:4 == i1:i2) ! 309s > ## 309s > ## 2. 'B' has quite different scaling and it does (must!) obey rule 309s > ## scale i1:i2 only 309s > ## 309s > ## 3. 'B'(oth) is better than "P" and "S" separately: 309s > ## 309s > kappa(eigen(m6)$vectors)# 597.5588 309s [1] 597.5588 309s > kappa(eigen(dm6$P$z)$vectors)# 597.5588 309s [1] 597.5588 309s > kappa(eigen(dm6$S$z)$vectors)# 42.58396 309s [1] 621.5746 309s > kappa(eigen(dm6$B$z)$vectors)# 22.20266 309s [1] 597.5588 309s > 309s > 309s > ## An n=17 example where octave's expm() is wrong too 309s > m17 <- matrix(c(10,0, 0, 2, 3,-1, 0, 0, 0, 0, 0, 4, 0, 5, 0, 0,-2, 309s + 0, 0, 0, 0,-3, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 7, 0, 309s + 0, 0,10, 0, 0,-4, 9, 0, 0, 0,-5, 0,-6, 0, 0, 0, 0, 309s + 0, 0,-7, 0, 0, 0, 0, 0, 0,10, 0, 0, 0, 0, 0,11, 0, 309s + 0, 0, 0, 0, 0, 0,12, 0, 0, 0, 0, 0,-8, 0, 0, 0, 0, 309s + 0, 0,-9, 0, 0, 0, 0, 0, 0,-10,0,13,14,-11,-12,-13, 0, 309s + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 309s + 0, 0, 0, 0, 0, 0, 0,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 309s + 0, 0, 0, 0, 0,-14,16,0,-10,0,17, 0, 0, 0, 0, 0, 0, 309s + 0, 0,-16,0, 0,18,19, 0, 0, 0, 0, 0, 0, 0,20, 0, 21, 309s + 22,0, 0, 0, 0, 0,-17,0, 0, 0,-10,-19,-20,0,0,0, 0, 309s + 0,-21,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 309s + 0, 0, 0,23,24, 0,25,26, 0, 0,27,-22,0,28,-23,0,-24, 309s + 0,-25,0,29, 0, 0, 0, 0, 0, 0, 0,30,31, 0, 0, 0, 0, 309s + 0, 0,-26,32,0, 0, 0, 0, 0,-27,0,33,34, 0, 0, 0, 0, 309s + 0,-28,-29,0,0, 0,35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 309s + 0, 0, 0, 0, 0, 0,36,37, 0, 0, 0, 0, 0, 0, 0, 0,-10), 309s + 17, 17) 309s > str(dm17 <- balanceTst(m17)) 309s List of 4 309s $ P :List of 4 309s ..$ z : num [1:17, 1:17] 0 0 0 0 0 0 0 0 0 0 ... 309s ..$ scale: num [1:17] 7 8 9 1 1 1 1 1 1 1 ... 309s ..$ i1 : int 4 309s ..$ i2 : int 16 309s $ S :List of 4 309s ..$ z : num [1:17, 1:17] 0 0 0 0 0 0 0 0 0 0 ... 309s ..$ scale: num [1:17] 1 4 1 2 1 1 1 2 2 1 ... 309s ..$ i1 : int 1 309s ..$ i2 : int 17 309s $ B :List of 4 309s ..$ z : num [1:17, 1:17] 0 0 0 0 0 0 0 0 0 0 ... 309s ..$ scale: num [1:17] 7 8 9 2 2 1 1 2 2 1 ... 309s ..$ i1 : int 4 309s ..$ i2 : int 16 309s $ Sz.eq.Bz: logi FALSE 309s > sapply(dm17[1:3], `[[`, "scale") 309s P S B 309s [1,] 7 1.0 7 309s [2,] 8 4.0 8 309s [3,] 9 1.0 9 309s [4,] 1 2.0 2 309s [5,] 1 1.0 2 309s [6,] 1 1.0 1 309s [7,] 1 1.0 1 309s [8,] 1 2.0 2 309s [9,] 1 2.0 2 309s [10,] 1 1.0 1 309s [11,] 1 1.0 1 309s [12,] 1 2.0 2 309s [13,] 1 1.0 1 309s [14,] 1 1.0 1 309s [15,] 1 1.0 1 309s [16,] 1 1.0 1 309s [17,] 9 0.5 9 309s > 309s > ## The balancing was really rather harmful -- cond(V) *not* improved: 309s > condX <- function(x) kappa(x, exact=TRUE) 309s > condX(eigen(m17)$vectors)# 8.9e16 309s [1] 6.985668e+16 309s > condX(eigen(dm17$P$z)$vectors)# 1.37e17 309s [1] 1.36865e+17 309s > condX(eigen(dm17$S$z)$vectors)# 1.44e17 309s [1] 6.451363e+16 309s > condX(eigen(dm17$B$z)$vectors)# 1.43e17 (very slightly smaller) 309s [1] 1.437207e+17 309s > 309s 309s R version 4.4.3 (2025-02-28) -- "Trophy Case" 309s Copyright (C) 2025 The R Foundation for Statistical Computing 309s Platform: arm-unknown-linux-gnueabihf (32-bit) 309s 309s R is free software and comes with ABSOLUTELY NO WARRANTY. 309s You are welcome to redistribute it under certain conditions. 309s Type 'license()' or 'licence()' for distribution details. 309s 309s R is a collaborative project with many contributors. 309s Type 'contributors()' for more information and 309s 'citation()' on how to cite R or R packages in publications. 309s 309s Type 'demo()' for some demos, 'help()' for on-line help, or 309s 'help.start()' for an HTML browser interface to help. 309s Type 'q()' to quit R. 309s 309s > library(expm) 309s Loading required package: Matrix 310s > 310s > (sI <- sessionInfo()) 310s 310s Attaching package: ‘expm’ 310s 310s The following object is masked from ‘package:Matrix’: 310s 310s expm 310s 311s R version 4.4.3 (2025-02-28) 311s Platform: arm-unknown-linux-gnueabihf (32-bit) 311s Running under: Ubuntu Plucky Puffin (development branch) 311s 311s Matrix products: default 311s BLAS: /usr/lib/arm-linux-gnueabihf/blas/libblas.so.3.12.1 311s LAPACK: /usr/lib/arm-linux-gnueabihf/lapack/liblapack.so.3.12.1; LAPACK version 3.12.0 311s 311s locale: 311s [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 311s [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 311s [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C 311s [10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C 311s 311s time zone: Etc/UTC 311s tzcode source: system (glibc) 311s 311s attached base packages: 311s [1] stats graphics grDevices utils datasets methods base 311s 311s other attached packages: 311s [1] expm_1.0-0 Matrix_1.7-3 311s 311s loaded via a namespace (and not attached): 311s [1] compiler_4.4.3 grid_4.4.3 lattice_0.22-6 311s > packageDescription("Matrix") 311s Package: Matrix 311s Version: 1.7-3 311s VersionNote: do also bump src/version.h, inst/include/Matrix/version.h 311s Date: 2025-03-05 311s Priority: recommended 311s Title: Sparse and Dense Matrix Classes and Methods 311s Description: A rich hierarchy of sparse and dense matrix classes, 311s including general, symmetric, triangular, and diagonal matrices 311s with numeric, logical, or pattern entries. Efficient methods 311s for operating on such matrices, often wrapping the 'BLAS', 311s 'LAPACK', and 'SuiteSparse' libraries. 311s License: GPL (>= 2) | file LICENCE 311s URL: https://Matrix.R-forge.R-project.org 311s BugReports: https://R-forge.R-project.org/tracker/?atid=294&group_id=61 311s Contact: Matrix-authors@R-project.org 311s Authors@R: c(person("Douglas", "Bates", role = "aut", comment = c(ORCID 311s = "0000-0001-8316-9503")), person("Martin", "Maechler", role = 311s c("aut", "cre"), email = "mmaechler+Matrix@gmail.com", comment 311s = c(ORCID = "0000-0002-8685-9910")), person("Mikael", "Jagan", 311s role = "aut", comment = c(ORCID = "0000-0002-3542-2938")), 311s person("Timothy A.", "Davis", role = "ctb", comment = c(ORCID = 311s "0000-0001-7614-6899", "SuiteSparse libraries", "collaborators 311s listed in dir(system.file(\"doc\", \"SuiteSparse\", 311s package=\"Matrix\"), pattern=\"License\", full.names=TRUE, 311s recursive=TRUE)")), person("George", "Karypis", role = "ctb", 311s comment = c(ORCID = "0000-0003-2753-1437", "METIS library", 311s "Copyright: Regents of the University of Minnesota")), 311s person("Jason", "Riedy", role = "ctb", comment = c(ORCID = 311s "0000-0002-4345-4200", "GNU Octave's condest() and 311s onenormest()", "Copyright: Regents of the University of 311s California")), person("Jens", "Oehlschlägel", role = "ctb", 311s comment = "initial nearPD()"), person("R Core Team", role = 311s "ctb", comment = c(ROR = "02zz1nj61", "base R's matrix 311s implementation"))) 311s Depends: R (>= 4.4), methods 311s Imports: grDevices, graphics, grid, lattice, stats, utils 311s Suggests: MASS, datasets, sfsmisc, tools 311s Enhances: SparseM, graph 311s LazyData: no 311s LazyDataNote: not possible, since we use data/*.R and our S4 classes 311s BuildResaveData: no 311s Encoding: UTF-8 311s NeedsCompilation: yes 311s Packaged: 2025-03-05 09:59:22 UTC; maechler 311s Author: Douglas Bates [aut] (), 311s Martin Maechler [aut, cre] 311s (), Mikael Jagan [aut] 311s (), Timothy A. Davis 311s [ctb] (, SuiteSparse 311s libraries, collaborators listed in dir(system.file("doc", 311s "SuiteSparse", package="Matrix"), pattern="License", 311s full.names=TRUE, recursive=TRUE)), George Karypis [ctb] 311s (, METIS library, 311s Copyright: Regents of the University of Minnesota), Jason Riedy 311s [ctb] (, GNU Octave's 311s condest() and onenormest(), Copyright: Regents of the 311s University of California), Jens Oehlschlägel [ctb] (initial 311s nearPD()), R Core Team [ctb] (02zz1nj61, base R's matrix 311s implementation) 311s Maintainer: Martin Maechler 311s Repository: CRAN 311s Date/Publication: 2025-03-11 07:20:02 UTC 311s Built: R 4.4.3; arm-unknown-linux-gnueabihf; 'Tue, 11 Mar 2025 07:27:34 311s -0500'; unix 311s 311s -- File: /usr/lib/R/library/Matrix/Meta/package.rds 311s > packageDescription("expm") 311s Package: expm 311s Type: Package 311s Title: Matrix Exponential, Log, 'etc' 311s Version: 1.0-0 311s Date: 2024-08-19 311s Authors@R: c(person("Martin", "Maechler", role=c("aut","cre"), 311s email="maechler@stat.math.ethz.ch", comment = c(ORCID = 311s "0000-0002-8685-9910")) , person("Christophe","Dutang", role = 311s "aut", comment = c(ORCID = "0000-0001-6732-1501")) , 311s person("Vincent", "Goulet", role = "aut", comment = c(ORCID = 311s "0000-0002-9315-5719")) , person("Douglas", "Bates", role = 311s "ctb", comment = "cosmetic clean up, in svn r42") , 311s person("David", "Firth", role = "ctb", comment = "expm(method= 311s \"PadeO\" and \"TaylorO\")") , person("Marina", "Shapira", role 311s = "ctb", comment = "expm(method= \"PadeO\" and \"TaylorO\")") , 311s person("Michael", "Stadelmann", role = "ctb", comment = 311s "\"Higham08*\" methods, see ?expm.Higham08...") ) 311s Contact: expm-developers@lists.R-forge.R-project.org 311s Description: Computation of the matrix exponential, logarithm, sqrt, 311s and related quantities, using traditional and modern methods. 311s Depends: Matrix 311s Imports: methods 311s Suggests: RColorBrewer, sfsmisc, Rmpfr 311s BuildResaveData: no 311s License: GPL (>= 2) 311s URL: https://R-Forge.R-project.org/projects/expm/ 311s BugReports: 311s https://R-forge.R-project.org/tracker/?atid=472&group_id=107 311s Encoding: UTF-8 311s NeedsCompilation: yes 311s Packaged: 2024-08-19 09:24:41 UTC; maechler 311s Author: Martin Maechler [aut, cre] 311s (), Christophe Dutang 311s [aut] (), Vincent Goulet 311s [aut] (), Douglas Bates 311s [ctb] (cosmetic clean up, in svn r42), David Firth [ctb] 311s (expm(method= "PadeO" and "TaylorO")), Marina Shapira [ctb] 311s (expm(method= "PadeO" and "TaylorO")), Michael Stadelmann [ctb] 311s ("Higham08*" methods, see ?expm.Higham08...) 311s Maintainer: Martin Maechler 311s Repository: CRAN 311s Date/Publication: 2024-08-19 15:20:07 UTC 311s Built: R 4.4.1; arm-unknown-linux-gnueabihf; 'Mon, 07 Oct 2024 13:27:09 311s +0900'; unix 311s 311s -- File: /usr/lib/R/site-library/expm/Meta/package.rds 311s > 311s > source(system.file("test-tools.R", package= "expm"), keep.source=FALSE) 311s Loading required package: tools 311s > 311s > ## Note that these results are achieved with the default 311s > ## settings order=8, method="Pade" -- accuracy could 311s > ## presumably be improved still further by some tuning 311s > ## of these settings. 311s > 311s > ### Latest ATLAS (for BDR on F 36; R-devel Oct.2023) has much worse precision: 311s > ##==> use much larger tolerance in such cases: 311s > 311s > ## Simplified (needs R 3.4.0 and newer, from robustbase/inst/xtraR/platform-sessionInfo.R ) : 311s > BLAS <- extSoftVersion()[["BLAS"]] 311s > Lapack <- La_library() 311s > is.BLAS.Lapack <- identical(BLAS, Lapack) 311s > ## A cheap check (that works on KH's debian-gcc setup, 2019-05): 311s > if(!length(BLAS.is.openBLAS <- grepl("openblas", BLAS, ignore.case=TRUE))) 311s + BLAS.is.openBLAS <- NA 311s > if(!length(Lapack.is.openBLAS <- grepl("openblas", Lapack, ignore.case=TRUE))) 311s + Lapack.is.openBLAS <- NA 311s > 311s > (maybeATLAS <- is.BLAS.Lapack && !BLAS.is.openBLAS) 311s [1] FALSE 311s > 311s > 311s > ## ---------------------------- 311s > ## Test case 1 from Ward (1977) 311s > ## ---------------------------- 311s > T1 <- rbind(c(4, 2, 0), 311s + c(1, 4, 1), 311s + c(1, 1, 4)) 311s > (m1 <- expm(T1, method="Pade")) 311s [,1] [,2] [,3] 311s [1,] 147.8666 183.7651 71.79703 311s [2,] 127.7811 183.7651 91.88257 311s [3,] 127.7811 163.6796 111.96811 311s attr(,"accuracy") 311s [1] 9.942847e-12 311s > (m1O <- expm(T1, method="PadeO"))# very slightly different 311s [,1] [,2] [,3] 311s [1,] 147.8666 183.7651 71.79703 311s [2,] 127.7811 183.7651 91.88257 311s [3,] 127.7811 163.6796 111.96811 311s attr(,"accuracy") 311s [1] 9.942847e-12 311s > (m1T <- expm(T1, method="Taylor")) 311s [,1] [,2] [,3] 311s [1,] 147.8666 183.7651 71.79703 311s [2,] 127.7811 183.7651 91.88257 311s [3,] 127.7811 163.6796 111.96811 311s attr(,"accuracy") 311s [1] 3.907339e-13 311s > (m1TO <- expm(T1, method="TaylorO")) 311s [,1] [,2] [,3] 311s [1,] 147.8666 183.7651 71.79703 311s [2,] 127.7811 183.7651 91.88257 311s [3,] 127.7811 163.6796 111.96811 311s attr(,"accuracy") 311s [1] 3.907339e-13 311s > ## True Eigenvalue Decomposition of T1 311s > s2 <- sqrt(2) 311s > eV1 <- matrix(c(s2,s2,s2, -2,1,1, 2,-1,-1) / sqrt(6), 311s + 3,3) 311s > L1 <- diag(lm1 <- c(6, 3, 3)) 311s > stopifnot( 311s + all.equal(eV1 %*% L1, T1 %*% eV1, tolerance=1e-15) 311s + ) 311s > ## However, eV1 is not orthogonal, but of rank 2 311s > 311s > if(FALSE) { ## require("Rmpfr")) { ## 200 bit precision version of that 311s + S2 <- sqrt(mpfr(2,200)) 311s + E1 <- c(S2,S2,S2, -2,1,1, 2,-1,-1) / sqrt(mpfr(6,200)) 311s + dim(E1) <- c(3,3) 311s + print(E1 %*% L1) 311s + print(E1) 311s + } 311s > 311s > ## "true" result 311s > m1.t <- matrix(c(147.866622446369, 127.781085523181, 127.781085523182, 311s + 183.765138646367, 183.765138646366, 163.679601723179, 311s + 71.797032399996, 91.8825693231832, 111.968106246371), 3,3) 311s > stopifnot(all.equal(m1.t, m1, check.attributes=FALSE, tolerance = 1e-13), 311s + all.equal(m1.t, m1O, check.attributes=FALSE, tolerance = 1e-13), 311s + all.equal(m1.t,m1T, check.attributes=FALSE, tolerance = 1e-13), 311s + all.equal(m1.t,m1TO, check.attributes=FALSE, tolerance = 1e-13), 311s + all.equal(m1.t, expm(T1,"Ward77"), tolerance = 1e-13), 311s + all.equal(m1.t, expm(T1,"R_Pade"), tolerance = 1e-13), 311s + all.equal(m1.t, expm(T1,"R_Ward77"), tolerance = 1e-13)) 311s > ## -- these agree with ward (1977, p608) 311s > ## 311s > m1.2 <- try( expm(T1, "R_Eigen") ) ## 32-bit: gives an error from solve; 64-bit "ok" 311s > if(!inherits(m1.2, "try-error")) { 311s + if(FALSE)## with libatlas R_Eigen is "sehr eigen" 311s + stopifnot(all.equal(m1.t, m1.2, check.attributes=FALSE)) 311s + ## but it's less accurate: 311s + print( all.equal(m1.t, m1.2, check.attributes=FALSE, tolerance= 1e-12)) 311s + ##-> rel.diff = 6.44e-10 / 6.2023e-10 311s + ##__ BUT 0.1228099 311s + ##__ with libatlas (ubuntu 12.04 libatlas-base-dev Version: 3.8.4-3build1) 311s + } 311s [1] "Mean relative difference: 6.202299e-10" 311s > 311s > ## 311s > ## ---------------------------- 311s > ## Test case 2 from Ward (1977) 311s > ## ---------------------------- 311s > T2 <- t(matrix(c( 311s + 29.87942128909879, .7815750847907159, -2.289519314033932, 311s + .7815750847907159, 25.72656945571064, 8.680737820540137, 311s + -2.289519314033932, 8.680737820540137, 34.39400925519054), 311s + 3, 3)) 311s > (m2 <- expm(T2, method="Pade")) 311s [,1] [,2] [,3] 311s [1,] 5.496314e+15 -1.823188e+16 -3.047577e+16 311s [2,] -1.823188e+16 6.060523e+16 1.012918e+17 311s [3,] -3.047577e+16 1.012918e+17 1.692944e+17 311s attr(,"accuracy") 311s [1] 53010 311s > ## [,1] [,2] [,3] 311s > ##[1,] 5496313853692357 -18231880972009844 -30475770808580828 311s > ##[2,] -18231880972009852 60605228702227024 101291842930256144 311s > ##[3,] -30475770808580840 101291842930256144 169294411240859072 311s > ## -- which agrees with Ward (1977) to 13 significant figures 311s > (m2O <- expm(T2, method="PadeO")) 311s [,1] [,2] [,3] 311s [1,] 5.496314e+15 -1.823188e+16 -3.047577e+16 311s [2,] -1.823188e+16 6.060523e+16 1.012918e+17 311s [3,] -3.047577e+16 1.012918e+17 1.692944e+17 311s attr(,"accuracy") 311s [1] 53010 311s > (m2T <- expm(T2,method="Taylor")) 311s [,1] [,2] [,3] 311s [1,] 5.496314e+15 -1.823188e+16 -3.047577e+16 311s [2,] -1.823188e+16 6.060523e+16 1.012918e+17 311s [3,] -3.047577e+16 1.012918e+17 1.692944e+17 311s attr(,"accuracy") 311s [1] 55.1362 311s > (m2TO <- expm(T2,method="TaylorO")) 311s [,1] [,2] [,3] 311s [1,] 5.496314e+15 -1.823188e+16 -3.047577e+16 311s [2,] -1.823188e+16 6.060523e+16 1.012918e+17 311s [3,] -3.047577e+16 1.012918e+17 1.692944e+17 311s attr(,"accuracy") 311s [1] 55.1362 311s > 311s > m2.t <- matrix(c(5496313853692216, -18231880972008932, -30475770808579672, 311s + -18231880972008928, 60605228702222480, 101291842930249776, 311s + -30475770808579672, 101291842930249808, 169294411240850528), 311s + 3, 3) 311s > 311s > ## -- in this case a very similar degree of accuracy -- even Taylor is ok 311s > stopifnot(all.equal(m2.t, m2, check.attributes=FALSE, tolerance = 1e-12), 311s + all.equal(m2.t, m2O,check.attributes=FALSE, tolerance = 1e-12), 311s + all.equal(m2.t,m2T, check.attributes=FALSE, tolerance = 1e-12), 311s + all.equal(m2.t,m2TO,check.attributes=FALSE, tolerance = 1e-12), 311s + all.equal(m2.t, expm(T2,"Ward77"), tolerance = 1e-12), 311s + all.equal(m2.t, expm(T2,"R_Ward77"), tolerance = 1e-12), 311s + all.equal(m2.t, expm(T2,"R_Pade"), tolerance = 1e-12), 311s + TRUE) 311s > 311s > ## ---------------------------- 311s > ## Test case 3 from Ward (1977) 311s > ## ---------------------------- 311s > T3 <- t(matrix(c( 311s + -131, 19, 18, 311s + -390, 56, 54, 311s + -387, 57, 52), 3, 3)) 311s > (m3 <- expm(T3, method="Pade")) 311s [,1] [,2] [,3] 311s [1,] -1.509644 0.3678794 0.1353353 311s [2,] -5.632571 1.4715178 0.4060058 311s [3,] -4.934938 1.1036383 0.5413411 311s attr(,"accuracy") 311s [1] 4.375779e-11 311s > ## [,1] [,2] [,3] 311s > ##[1,] -1.5096441587713636 0.36787943910439874 0.13533528117301735 311s > ##[2,] -5.6325707997970271 1.47151775847745725 0.40600584351567010 311s > ##[3,] -4.9349383260294299 1.10363831731417195 0.54134112675653534 311s > ## -- agrees to 10dp with Ward (1977), p608. 311s > (m3O <- expm(T3, method="PadeO")) 311s [,1] [,2] [,3] 311s [1,] -1.509644 0.3678794 0.1353353 311s [2,] -5.632571 1.4715178 0.4060058 311s [3,] -4.934938 1.1036383 0.5413411 311s attr(,"accuracy") 311s [1] 4.375779e-11 311s > (m3T <- expm(T3,method="Taylor")) 311s [,1] [,2] [,3] 311s [1,] -1.509644 0.3678794 0.1353353 311s [2,] -5.632571 1.4715178 0.4060058 311s [3,] -4.934938 1.1036383 0.5413411 311s attr(,"accuracy") 311s [1] 0 311s > (m3TO <- expm(T3,method="TaylorO")) 311s [,1] [,2] [,3] 311s [1,] -1.509644 0.3678794 0.1353353 311s [2,] -5.632571 1.4715178 0.4060058 311s [3,] -4.934938 1.1036383 0.5413411 311s attr(,"accuracy") 311s [1] 0 311s > 311s > m3.t <- matrix(c(-1.50964415879218, -5.6325707998812, -4.934938326092, 311s + 0.367879439109187, 1.47151775849686, 1.10363831732856, 311s + 0.135335281175235, 0.406005843524598, 0.541341126763207), 311s + 3,3) 311s > 311s > stopifnot(all.equal(m3.t, m3, check.attributes=FALSE, tolerance = 3e-11), 311s + # ^^^^^ 311s + # 1.2455e-11 for libatlas (above) 311s + all.equal(m3.t, m3T, check.attributes=FALSE, tolerance = 1e-11), 311s + all.equal(m3.t, m3O, check.attributes=FALSE, tolerance = 8e-11),# M1: 1.39e-11 311s + all.equal(m3.t, m3TO, check.attributes=FALSE, tolerance = 1e-11), 311s + all.equal(m3.t, expm(T3,"R_Eigen"), tolerance = 1e-11), 311s + all.equal(m3.t, expm(T3,"Ward77"), tolerance = 1e-11), 311s + all.equal(m3.t, expm(T3,"R_Ward"), tolerance = 1e-11), 311s + all.equal(m3.t, expm(T3,"R_Pade"), tolerance = 1e-11), 311s + TRUE) 311s > ## -- in this case, a similar level of agreement with Ward (1977). 311s > 311s > ##-------- expm() ------------------- 311s > 311s > z3 <- T3 * (1 + 1i) 311s > Lz3 <- expmAll(z3) 311s > str(Lz3) 311s List of 13 311s $ Higham08.b : cplx [1:3, 1:3] -0.427+1.3i -1.878+4.82i -1.113+4.26i ... 311s $ Higham08 : cplx [1:3, 1:3] -0.427+1.3i -1.878+4.82i -1.113+4.26i ... 311s $ AlMohy-Hi09 : chr "matexp_MH09(.) is _not yet_ implemented for complex matrices" 311s $ Ward77 : chr "invalid argument: not a numeric matrix" 311s $ PadeRBS : chr "expm(, method='PadeRBS') is not (yet) implemented" 311s $ Pade : chr "expm(, method='Pade') is not (yet) implemented" 311s $ Taylor : chr "expm(, method='Taylor') is not (yet) implemented" 311s $ PadeO : chr "expm(, method='PadeO') is not (yet) implemented" 311s $ TaylorO : chr "expm(, method='TaylorO') is not (yet) implemented" 311s $ R_Eigen : cplx [1:3, 1:3] -0.427+1.3i -1.878+4.82i -1.113+4.26i ... 311s $ R_Pade : cplx [1:3, 1:3] -0.427+1.3i -1.878+4.82i -1.113+4.26i ... 311s $ R_Ward77 : cplx [1:3, 1:3] -0.427+1.3i -1.878+4.82i -1.113+4.26i ... 311s $ hybrid_Eigen_Ward: chr "invalid argument: not a numeric matrix" 311s > Lz3. <- Lz3[.methComplex] 311s > str(allEq(Lz3., tol=0)) # -> max seen (Lnx 64): 1.3376e-12 311s List of 4 311s $ Higham08: chr "Mean relative Mod difference: 7.236117e-13" 311s $ R_Eigen : chr "Mean relative Mod difference: 5.525668e-13" 311s $ R_Pade : chr "Mean relative Mod difference: 1.337624e-12" 311s $ R_Ward77: chr "Mean relative Mod difference: 2.757525e-13" 311s > stopifnot(unlist(allEq(Lz3.))) 311s > 311s > 311s > ## ---------------------------- 311s > ## Test case 4 from Ward (1977) 311s > ## ---------------------------- 311s > T4 <- 311s + array(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 1e-10, 311s + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 311s + 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 311s + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 311s + 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 311s + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 311s + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 311s + 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 311s + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 311s + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0), 311s + dim = c(10, 10)) 311s > (m4 <- expm(T4, method="Pade")) 311s [,1] [,2] [,3] [,4] [,5] 311s [1,] 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 311s [2,] 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 311s [3,] 2.480159e-15 2.755567e-16 1.000000e+00 1.000000e+00 5.000000e-01 311s [4,] 1.984127e-14 2.480059e-15 2.755582e-16 1.000000e+00 1.000000e+00 311s [5,] 1.388889e-13 1.984077e-14 2.480067e-15 2.755581e-16 1.000000e+00 311s [6,] 8.333333e-13 1.388869e-13 1.984080e-14 2.480067e-15 2.755581e-16 311s [7,] 4.166667e-12 8.333273e-13 1.388870e-13 1.984080e-14 2.480067e-15 311s [8,] 1.666667e-11 4.166654e-12 8.333274e-13 1.388869e-13 1.984079e-14 311s [9,] 5.000000e-11 1.666667e-11 4.166667e-12 8.333333e-13 1.388889e-13 311s [10,] 1.000000e-10 5.000000e-11 1.666667e-11 4.166667e-12 8.333333e-13 311s [,6] [,7] [,8] [,9] [,10] 311s [1,] 8.333333e-03 1.388889e-03 1.984127e-04 2.480159e-05 2.755732e-06 311s [2,] 4.166667e-02 8.333333e-03 1.388889e-03 1.984127e-04 2.480159e-05 311s [3,] 1.666667e-01 4.166667e-02 8.333333e-03 1.388889e-03 1.984127e-04 311s [4,] 5.000000e-01 1.666667e-01 4.166667e-02 8.333333e-03 1.388889e-03 311s [5,] 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 8.333333e-03 311s [6,] 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 311s [7,] 2.755583e-16 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 311s [8,] 2.480064e-15 2.755577e-16 1.000000e+00 1.000000e+00 5.000000e-01 311s [9,] 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 311s [10,] 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 311s attr(,"accuracy") 311s [1] 1.440257e-16 311s > (m4O <- expm(T4, method="PadeO")) 311s [,1] [,2] [,3] [,4] [,5] 311s [1,] 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 311s [2,] 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 311s [3,] 2.480159e-15 2.755567e-16 1.000000e+00 1.000000e+00 5.000000e-01 311s [4,] 1.984127e-14 2.480059e-15 2.755582e-16 1.000000e+00 1.000000e+00 311s [5,] 1.388889e-13 1.984077e-14 2.480067e-15 2.755581e-16 1.000000e+00 311s [6,] 8.333333e-13 1.388869e-13 1.984080e-14 2.480067e-15 2.755581e-16 311s [7,] 4.166667e-12 8.333273e-13 1.388870e-13 1.984080e-14 2.480067e-15 311s [8,] 1.666667e-11 4.166654e-12 8.333274e-13 1.388869e-13 1.984079e-14 311s [9,] 5.000000e-11 1.666667e-11 4.166667e-12 8.333333e-13 1.388889e-13 311s [10,] 1.000000e-10 5.000000e-11 1.666667e-11 4.166667e-12 8.333333e-13 311s [,6] [,7] [,8] [,9] [,10] 311s [1,] 8.333333e-03 1.388889e-03 1.984127e-04 2.480159e-05 2.755732e-06 311s [2,] 4.166667e-02 8.333333e-03 1.388889e-03 1.984127e-04 2.480159e-05 311s [3,] 1.666667e-01 4.166667e-02 8.333333e-03 1.388889e-03 1.984127e-04 311s [4,] 5.000000e-01 1.666667e-01 4.166667e-02 8.333333e-03 1.388889e-03 311s [5,] 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 8.333333e-03 311s [6,] 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 311s [7,] 2.755583e-16 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 311s [8,] 2.480064e-15 2.755577e-16 1.000000e+00 1.000000e+00 5.000000e-01 311s [9,] 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 311s [10,] 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 311s attr(,"accuracy") 311s [1] 1.440257e-16 311s > (m4T <- expm(T4,method="Taylor")) 311s [,1] [,2] [,3] [,4] [,5] 311s [1,] 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 311s [2,] 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 311s [3,] 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 311s [4,] 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 311s [5,] 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 311s [6,] 8.333333e-13 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 311s [7,] 4.166667e-12 8.333333e-13 1.388889e-13 1.984127e-14 2.480159e-15 311s [8,] 1.666667e-11 4.166667e-12 8.333333e-13 1.388889e-13 1.984127e-14 311s [9,] 5.000000e-11 1.666667e-11 4.166667e-12 8.333333e-13 1.388889e-13 311s [10,] 1.000000e-10 5.000000e-11 1.666667e-11 4.166667e-12 8.333333e-13 311s [,6] [,7] [,8] [,9] [,10] 311s [1,] 8.333333e-03 1.388889e-03 1.984127e-04 2.480159e-05 2.755732e-06 311s [2,] 4.166667e-02 8.333333e-03 1.388889e-03 1.984127e-04 2.480159e-05 311s [3,] 1.666667e-01 4.166667e-02 8.333333e-03 1.388889e-03 1.984127e-04 311s [4,] 5.000000e-01 1.666667e-01 4.166667e-02 8.333333e-03 1.388889e-03 311s [5,] 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 8.333333e-03 311s [6,] 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 311s [7,] 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 311s [8,] 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 311s [9,] 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 311s [10,] 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 311s attr(,"accuracy") 311s [1] 2.50637e-18 311s > (m4TO <- expm(T4,method="TaylorO")) 311s [,1] [,2] [,3] [,4] [,5] 311s [1,] 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 311s [2,] 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 311s [3,] 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 311s [4,] 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 311s [5,] 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 311s [6,] 8.333333e-13 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 311s [7,] 4.166667e-12 8.333333e-13 1.388889e-13 1.984127e-14 2.480159e-15 311s [8,] 1.666667e-11 4.166667e-12 8.333333e-13 1.388889e-13 1.984127e-14 311s [9,] 5.000000e-11 1.666667e-11 4.166667e-12 8.333333e-13 1.388889e-13 311s [10,] 1.000000e-10 5.000000e-11 1.666667e-11 4.166667e-12 8.333333e-13 311s [,6] [,7] [,8] [,9] [,10] 311s [1,] 8.333333e-03 1.388889e-03 1.984127e-04 2.480159e-05 2.755732e-06 311s [2,] 4.166667e-02 8.333333e-03 1.388889e-03 1.984127e-04 2.480159e-05 311s [3,] 1.666667e-01 4.166667e-02 8.333333e-03 1.388889e-03 1.984127e-04 311s [4,] 5.000000e-01 1.666667e-01 4.166667e-02 8.333333e-03 1.388889e-03 311s [5,] 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 8.333333e-03 311s [6,] 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 311s [7,] 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 311s [8,] 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 311s [9,] 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 311s [10,] 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 311s attr(,"accuracy") 311s [1] 2.50637e-18 311s > 311s > ## ATLAS on BDR's gannet (Fedora 26; gcc-13; R-devel 2023-10-24) 311s > tol1 <- if(maybeATLAS) 4e-7 else 5e-15 # (m4, m4O) gave "Mean relative difference: 1.242879e-07" 311s > 311s > stopifnot(all.equal(m4 [,10], 1/gamma(10:1), tolerance=1e-14), 311s + all.equal(m4O [,10], 1/gamma(10:1), tolerance=1e-14), 311s + all.equal(m4T [,10], 1/gamma(10:1), tolerance=1e-14), 311s + all.equal(m4TO[,10], 1/gamma(10:1), tolerance=1e-14), 311s + all.equal(m4, m4O, check.attributes=FALSE, tolerance=tol1), 311s + all.equal(m4, m4T, check.attributes=FALSE, tolerance=tol1), 311s + all.equal(m4, m4TO,check.attributes=FALSE, tolerance=tol1), 311s + all.equal(m4, expm(T4,"Ward77"), check.attributes=FALSE, tolerance = 1e-14), 311s + all.equal(m4, expm(T4,"R_Ward"), check.attributes=FALSE, tolerance = 1e-14), 311s + all.equal(m4, expm(T4,"R_Pade"), check.attributes=FALSE, tolerance = 1e-14), 311s + max(abs(m4 - expm(T4,"R_Eigen"))) < 1e-7) 311s > ## here expm(., EV ) is accurate only to 7 d.p., whereas 311s > ## expm(.,Pade) is correct to at least 14 d.p. 311s > 311s > ### Test case with diagonalizable matrix with multiple Eigen values: 311s > A4 <- rbind(c(-1, 3, -1), 311s + c(-3, 5, -1), 311s + c(-3, 3, 1)) 311s > Ea4 <- eigen(A4) 311s > stopifnot(all.equal(Ea4$values, (lam4 <- c(2,2,1)))) 311s > ## However, the eigen values don't show the nice property: 311s > V4 <- Ea4$vectors 311s > crossprod(V4) 311s [,1] [,2] [,3] 311s [1,] 1.0000000 0.7742943 0.9258201 311s [2,] 0.7742943 1.0000000 0.9408751 311s [3,] 0.9258201 0.9408751 1.0000000 311s > ## i.e., they are *not* orthogonal 311s > ## but still diagonalize: 311s > stopifnot(all.equal(A4, 311s + V4 %*% diag(x=lam4) %*% solve(V4))) 311s > ## whereas this diagonalizes *and* looks nice 311s > W4 <- rbind(c(1, 1, -1), 311s + c(1, 1, 0), 311s + c(1, 0, 3)) 311s > (sW4 <- solve(W4)) 311s [,1] [,2] [,3] 311s [1,] 3 -3 1 311s [2,] -3 4 -1 311s [3,] -1 1 0 311s > assert.EQ(diag(x = c(1,2,2)), solve(W4) %*% A4 %*% W4, giveRE=TRUE) 311s > assert.EQ(A4, logm(expm(A4)), tol = 3e-13, giveRE=TRUE) 311s Mean relative difference: 3.848773e-15 311s > ## seen 5.5e-14 with R's own matprod 311s > 311s 311s R version 4.4.3 (2025-02-28) -- "Trophy Case" 311s Copyright (C) 2025 The R Foundation for Statistical Computing 311s Platform: arm-unknown-linux-gnueabihf (32-bit) 311s 311s R is free software and comes with ABSOLUTELY NO WARRANTY. 311s You are welcome to redistribute it under certain conditions. 311s Type 'license()' or 'licence()' for distribution details. 311s 311s R is a collaborative project with many contributors. 311s Type 'contributors()' for more information and 311s 'citation()' on how to cite R or R packages in publications. 311s 311s Type 'demo()' for some demos, 'help()' for on-line help, or 311s 'help.start()' for an HTML browser interface to help. 311s Type 'q()' to quit R. 311s 311s > 311s > #### Example matrices from the Matlab demos // expAtv() examples 311s > 311s > library(expm) 311s Loading required package: Matrix 312s 312s Attaching package: ‘expm’ 312s 312s The following object is masked from ‘package:Matrix’: 312s 312s expm 312s 312s > 312s > source(system.file("test-tools.R", package= "expm"), keep.source=FALSE) 312s Loading required package: tools 312s > ## -> assertError(), .., expmAll(), allEq(), doExtras 312s > 312s > ## --- 1 --- 312s > ## Here, all three {eigen; Taylor; Pade(Scaling & Squaring)} should do well 312s > 312s > A1 <- rbind(0:2, 312s + c(0.5, 0, 1), 312s + 2:0) 312s > A1 312s [,1] [,2] [,3] 312s [1,] 0.0 1 2 312s [2,] 0.5 0 1 312s [3,] 2.0 1 0 312s > ml1 <- lapply(c(4:10,20), 312s + function(order) expm(A1, "Pade", order=order)) 312s > for(k in seq_len(length(ml1) - 1)) 312s + stopifnot(all.equal(ml1[[k]], ml1[[k + 1]], tolerance = 1e-12)) 312s > 312s > for(k in seq_len(length(ml1) - 1)) { 312s + print(all.equal(ml1[[k]], ml1[[k + 1]], tolerance = 0)) 312s + } 312s [1] "Attributes: < Component “accuracy”: Mean relative difference: 0.3578187 >" 312s [2] "Mean relative difference: 1.034914e-14" 312s [1] "Attributes: < Component “accuracy”: Mean relative difference: 0.9310228 >" 312s [2] "Mean relative difference: 4.904643e-15" 312s [1] "Attributes: < Component “accuracy”: Mean relative difference: 87.66802 >" 312s [2] "Mean relative difference: 1.168155e-14" 312s [1] "Attributes: < Component “accuracy”: Mean relative difference: 0.8830912 >" 312s [2] "Mean relative difference: 3.043865e-15" 312s [1] "Attributes: < Component “accuracy”: Mean relative difference: 1.809533 >" 312s [2] "Mean relative difference: 8.040398e-15" 312s [1] "Attributes: < Component “accuracy”: Mean relative difference: 0.6008388 >" 312s [2] "Mean relative difference: 4.962074e-15" 312s [1] "Attributes: < Component “accuracy”: Mean relative difference: 0.01732771 >" 312s [2] "Mean relative difference: 4.066144e-15" 312s > 312s > mA1 <- ml1[[4]] 312s > stopifnot(all.equal(mA1, 312s + matrix(c(5.3090812852106, 2.8087900904073, 5.1737460019740, 312s + 4.0012030182399, 2.8845155413486, 4.0012030182399, 312s + 5.5778402926177, 3.1930144369526, 5.7131755758543), 312s + 3, 3), 312s + check.attributes = FALSE, tolerance = 1e-11)) 312s > 312s > 312s > ## --- 2 --- 312s > ## Here, Taylor "fails": 312s > 312s > ## A matrix where the terms in the Taylor series become very large 312s > ## before they go to zero. 312s > A2 <- rbind(c(-147, 72), 312s + c(-192, 93)) 312s > A2 312s [,1] [,2] 312s [1,] -147 72 312s [2,] -192 93 312s > 312s > (mA2 <- expm(A2, method="Pade")) 312s [,1] [,2] 312s [1,] -0.09957414 0.0746806 312s [2,] -0.19914827 0.1493612 312s attr(,"accuracy") 312s [1] 1.696305e-12 312s > stopifnot(all.equal(mA2, 312s + matrix(c(-0.099574136735459, -0.199148273470915, 312s + 0.074680602551593 , 0.149361205103183), 312s + 2, 2), check.attributes = FALSE, tolerance = 1e-11)) 312s > mA2.T <- expm(A2, method = "Taylor") 312s > stopifnot(all.equal(mA2, mA2.T, tolerance=1e-10)) 312s > all.equal(mA2, mA2.T, tolerance=1e-14)#-> 3.2e-12 {MM: I think that's pretty good} 312s [1] "Attributes: < Component “accuracy”: Mean relative difference: 1 >" 312s [2] "Mean relative difference: 5.034839e-12" 312s > 312s > ## Try all methods -------------------------------------- 312s > (meths <- eval(formals(expm)$method)) # >= 13 .. 312s [1] "Higham08.b" "Higham08" "AlMohy-Hi09" 312s [4] "Ward77" "PadeRBS" "Pade" 312s [7] "Taylor" "PadeO" "TaylorO" 312s [10] "R_Eigen" "R_Pade" "R_Ward77" 312s [13] "hybrid_Eigen_Ward" 312s > L2 <- expmAll(A2) 312s > str(L2) 312s List of 13 312s $ Higham08.b : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 312s $ Higham08 : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 312s $ AlMohy-Hi09 : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 312s $ Ward77 : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 312s $ PadeRBS : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 312s $ Pade : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 312s ..- attr(*, "accuracy")= num 1.7e-12 312s $ Taylor : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 312s ..- attr(*, "accuracy")= num 0 312s $ PadeO : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 312s ..- attr(*, "accuracy")= num 1.7e-12 312s $ TaylorO : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 312s ..- attr(*, "accuracy")= num 0 312s $ R_Eigen : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 312s $ R_Pade : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 312s $ R_Ward77 : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 312s $ hybrid_Eigen_Ward: num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 312s > str(allEq(L2, tol=0)) # -> max seen (Lnx 64): 2.7227e-12 312s List of 12 312s $ Higham08 : logi TRUE 312s $ AlMohy-Hi09 : chr "Mean relative difference: 4.863399e-14" 312s $ Ward77 : chr "Mean relative difference: 8.176456e-14" 312s $ PadeRBS : chr "Mean relative difference: 1.017279e-13" 312s $ Pade : chr "Mean relative difference: 2.722707e-12" 312s $ Taylor : chr "Mean relative difference: 2.312132e-12" 312s $ PadeO : chr "Mean relative difference: 2.722707e-12" 312s $ TaylorO : chr "Mean relative difference: 2.312132e-12" 312s $ R_Eigen : chr "Mean relative difference: 4.804995e-15" 312s $ R_Pade : chr "Mean relative difference: 1.236556e-13" 312s $ R_Ward77 : chr "Mean relative difference: 4.567135e-13" 312s $ hybrid_Eigen_Ward: chr "Mean relative difference: 4.725354e-15" 312s > stopifnot(unlist(allEq(L2))) 312s > 312s > ## --- 3 --- 312s > ## Here, Eigenvalues must fail ("not a full set"): 312s > A3 <- rbind(c(-1, 1), 312s + c(0, -1)) 312s > (mA3 <- expm(A3, method="Pade")) 312s [,1] [,2] 312s [1,] 0.3678794 0.3678794 312s [2,] 0.0000000 0.3678794 312s attr(,"accuracy") 312s [1] 1.665335e-16 312s > assertError(expm(mA3, method="R_Eigen"), verbose=TRUE) 312s Asserted error: system is computationally singular: reciprocal condition number = 1.11022e-16 312s > em1 <- exp(-1) 312s > stopifnot(all.equal(mA3, ## and the exact solution: 312s + matrix(c(em1, 0, em1, em1), 2, 2), 312s + check.attributes = FALSE, tolerance = 1e-14)) 312s > 312s > ## using 'eps' instead of 0 : 312s > ## ---> see m2ex3() etc in ./exact-ex.R 312s > 312s > L3 <- expmAll(A3) 312s > str(L3) # R_Eigen -- ".. computationally singular .." 312s List of 13 312s $ Higham08.b : num [1:2, 1:2] 0.368 0 0.368 0.368 312s $ Higham08 : num [1:2, 1:2] 0.368 0 0.368 0.368 312s $ AlMohy-Hi09 : num [1:2, 1:2] 0.368 0 0.368 0.368 312s $ Ward77 : num [1:2, 1:2] 0.368 0 0.368 0.368 312s $ PadeRBS : num [1:2, 1:2] 0.368 0 0.368 0.368 312s $ Pade : num [1:2, 1:2] 0.368 0 0.368 0.368 312s ..- attr(*, "accuracy")= num 1.67e-16 312s $ Taylor : num [1:2, 1:2] 0.368 0 0.368 0.368 312s ..- attr(*, "accuracy")= num 0 312s $ PadeO : num [1:2, 1:2] 0.368 0 0.368 0.368 312s ..- attr(*, "accuracy")= num 1.67e-16 312s $ TaylorO : num [1:2, 1:2] 0.368 0 0.368 0.368 312s ..- attr(*, "accuracy")= num 0 312s $ R_Eigen : chr "system is computationally singular: reciprocal condition number = 1.11022e-16" 312s $ R_Pade : num [1:2, 1:2] 0.368 0 0.368 0.368 312s $ R_Ward77 : num [1:2, 1:2] 0.368 0 0.368 0.368 312s $ hybrid_Eigen_Ward: num [1:2, 1:2] 0.368 0 0.368 0.368 312s > L3. <- L3[names(L3) != "R_Eigen"] 312s > str(allEq(L3., tol=0)) # -> max seen (Lnx 64): AlMohy-Hi09 -- ".. rel.diff.: 4.8188e-9" 312s List of 11 312s $ Higham08 : logi TRUE 312s $ AlMohy-Hi09 : chr "Mean relative difference: 4.818844e-09" 312s $ Ward77 : logi TRUE 312s $ PadeRBS : logi TRUE 312s $ Pade : chr "Mean relative difference: 2.112529e-15" 312s $ Taylor : chr "Mean relative difference: 2.112529e-15" 312s $ PadeO : chr "Mean relative difference: 2.112529e-15" 312s $ TaylorO : chr "Mean relative difference: 2.112529e-15" 312s $ R_Pade : chr "Mean relative difference: 7.544748e-16" 312s $ R_Ward77 : logi TRUE 312s $ hybrid_Eigen_Ward: logi TRUE 312s > stopifnot(unlist(allEq(L3., tol = 2e-8))) 312s > 312s > 312s > 312s > ## --- 4 --- 312s > ## Here, some version of do_expm() failed: 312s > (m <- matrix(c(0,2:0),2)) 312s [,1] [,2] 312s [1,] 0 1 312s [2,] 2 0 312s > ## Eigenvalue decomposition: 312s > d <- c(sqrt(2), -sqrt(2)) 312s > V <- rbind(c(sqrt(1/3), -sqrt(1/3)), 312s + c(sqrt(2/3), sqrt(2/3))) 312s > ## ==> 312s > IV <- rbind(c( sqrt(3/4), sqrt(3/8)), 312s + c(-sqrt(3/4), sqrt(3/8))) 312s > V.IV <- V %*% IV 312s > all.equal(V.IV, diag(2), tolerance=0) 312s [1] "Mean relative difference: 1.110223e-16" 312s > stopifnot(all.equal(V.IV, diag(2))) 312s > em.true <- V %*% (exp(d) * IV) 312s > all.equal(em.true, expm::expm(m), tolerance=0) 312s [1] "Mean relative difference: 1.878294e-16" 312s > stopifnot(all.equal(em.true, expm::expm(m)), 312s + all.equal(em.true, expm::expm(m,"Pade"), check.attributes=FALSE)) 312s > 312s > L4 <- expmAll(m) 312s > str(L4) 312s List of 13 312s $ Higham08.b : num [1:2, 1:2] 2.18 2.74 1.37 2.18 312s $ Higham08 : num [1:2, 1:2] 2.18 2.74 1.37 2.18 312s $ AlMohy-Hi09 : num [1:2, 1:2] 2.18 2.74 1.37 2.18 312s $ Ward77 : num [1:2, 1:2] 2.18 2.74 1.37 2.18 312s $ PadeRBS : num [1:2, 1:2] 2.18 2.74 1.37 2.18 312s $ Pade : num [1:2, 1:2] 2.18 2.74 1.37 2.18 312s ..- attr(*, "accuracy")= num 0 312s $ Taylor : num [1:2, 1:2] 2.18 2.74 1.37 2.18 312s ..- attr(*, "accuracy")= num 8.88e-16 312s $ PadeO : num [1:2, 1:2] 2.18 2.74 1.37 2.18 312s ..- attr(*, "accuracy")= num 0 312s $ TaylorO : num [1:2, 1:2] 2.18 2.74 1.37 2.18 312s ..- attr(*, "accuracy")= num 8.88e-16 312s $ R_Eigen : num [1:2, 1:2] 2.18 2.74 1.37 2.18 312s $ R_Pade : num [1:2, 1:2] 2.18 2.74 1.37 2.18 312s $ R_Ward77 : num [1:2, 1:2] 2.18 2.74 1.37 2.18 312s $ hybrid_Eigen_Ward: num [1:2, 1:2] 2.18 2.74 1.37 2.18 312s > str(allEq(L4, tol=0)) # -> max seen (Lnx 64): AlMohy-Hi09 -- rel.diff.: 3.575281e-8 312s List of 12 312s $ Higham08 : logi TRUE 312s $ AlMohy-Hi09 : chr "Mean relative difference: 3.575281e-08" 312s $ Ward77 : chr "Mean relative difference: 4.723648e-16" 312s $ PadeRBS : chr "Mean relative difference: 2.099399e-16" 312s $ Pade : chr "Mean relative difference: 2.862547e-15" 312s $ Taylor : chr "Mean relative difference: 1.075942e-15" 312s $ PadeO : chr "Mean relative difference: 2.862547e-15" 312s $ TaylorO : chr "Mean relative difference: 1.075942e-15" 312s $ R_Eigen : logi TRUE 312s $ R_Pade : chr "Mean relative difference: 7.085472e-16" 312s $ R_Ward77 : chr "Mean relative difference: 7.085472e-16" 312s $ hybrid_Eigen_Ward: chr "Mean relative difference: 1.622779e-16" 312s > stopifnot(unlist(allEq(L4, tol = 1e-7))) 312s > L4n09 <- L4[names(L4) != "AlMohy-Hi09"] 312s > str(allEq(L4n09, tol=0)) # -> max seen (Lnx 64): 2.8625e-15 312s List of 11 312s $ Higham08 : logi TRUE 312s $ Ward77 : chr "Mean relative difference: 4.723648e-16" 312s $ PadeRBS : chr "Mean relative difference: 2.099399e-16" 312s $ Pade : chr "Mean relative difference: 2.862547e-15" 312s $ Taylor : chr "Mean relative difference: 1.075942e-15" 312s $ PadeO : chr "Mean relative difference: 2.862547e-15" 312s $ TaylorO : chr "Mean relative difference: 1.075942e-15" 312s $ R_Eigen : logi TRUE 312s $ R_Pade : chr "Mean relative difference: 7.085472e-16" 312s $ R_Ward77 : chr "Mean relative difference: 7.085472e-16" 312s $ hybrid_Eigen_Ward: chr "Mean relative difference: 1.622779e-16" 312s > stopifnot(unlist(allEq(L4n09, tol = 1e-13))) 312s > 312s > 312s > ###----------- expAtv() ---------------- 312s > 312s > ## Bug report, 8 Sep 2014 (R-forge Bugs item #5919), by: Peter Ralph 312s > stopifnot(expAtv(A3, v=c(0,0))$eAtv == 0) 312s > 312s > 312s > n <- 500 312s > A <- bandSparse(n,n, -1:1, diagonals = list(-(2:n), -5*(1:n), 1:(n-1))) 312s > v <- 100*(n:1) 312s > t.v <- showSys.time(rr <- expAtv(A, v=v)) 313s Time user system elapsed 313s Time 0.280 0.019 0.300 313s > if(doExtras) { ## this is an order of magnitude slower : 313s + t.A <- system.time(w. <- (eA <- expm(A, "Higham08")) %*% v) 313s + stopifnot(all.equal(rr$eAtv, as.numeric(w.))) 313s + print( mean((t.A / t.v)[c(1,3)]) )## 23.57 {nb-mm3}; 21.0 {lynne} 313s + } 313s > 313s > 313s > ## Bug report on R-forge by Peter Ralph (petrelharp) 313s > ## If the entries of A are less than about 1e-8, then expAtv(A,v) fails 313s > ## with Error: length(d <- dim(x)) == 2 is not TRUE 313s > ## ... an error that comes from expm, because it has got a 1x1 matrix. (I can't tell why this causes an error; outside of expAtv this doesn't cause an error...) 313s > 313s > ## To reproduce: 313s > 313s > ##' @title Compute several "scaled" versions of e^{At} v : 313s > ##' @param A n x n matrix 313s > ##' @param v n vector 313s > ##' @param s vector of scales 313s > ##' @return list of expAtv() results 313s > ##' @author Martin Maechler, based on Peter Ralph's idea: 313s > scl.e.Atv <- function(A, v, s) { 313s + c(list(I = expAtv(A, v)), 313s + unlist(lapply(s, function(l) { 313s + ## cat(sprintf(" %7g\n", l)) 313s + list(lA = expAtv(l*A, v), lAI = expAtv(l*A, v, t=1/l)) 313s + }), recursive = FALSE)) 313s + } 313s > 313s > A <- matrix( 1:9, nrow=3 )/8 313s > v <- rep(1,3) 313s > sc <- 4^c(-500, -200, -100, -5*(15:6), -2*(14:9), -17:15) 313s > ## 10^9 is too large => expm() "overflow" NaN 313s > r <- scl.e.Atv(A,v, s = sc) # at least without error 313s > (eAv <- t(sapply(r, `[[`, "eAtv"))) 313s [,1] [,2] [,3] 313s I 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000000e+00 1.000000e+00 1.000000e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000000e+00 1.000000e+00 1.000000e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000000e+00 1.000000e+00 1.000000e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000000e+00 1.000000e+00 1.000000e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000000e+00 1.000000e+00 1.000000e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000000e+00 1.000000e+00 1.000000e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000000e+00 1.000000e+00 1.000000e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000000e+00 1.000000e+00 1.000000e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000000e+00 1.000000e+00 1.000000e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000000e+00 1.000000e+00 1.000000e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000000e+00 1.000000e+00 1.000000e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000000e+00 1.000000e+00 1.000000e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000000e+00 1.000000e+00 1.000000e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000000e+00 1.000000e+00 1.000000e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000000e+00 1.000000e+00 1.000000e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000000e+00 1.000000e+00 1.000000e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000000e+00 1.000000e+00 1.000000e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000000e+00 1.000000e+00 1.000000e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000000e+00 1.000000e+00 1.000000e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000000e+00 1.000000e+00 1.000000e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000000e+00 1.000000e+00 1.000000e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000000e+00 1.000000e+00 1.000000e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000000e+00 1.000000e+00 1.000000e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000000e+00 1.000000e+00 1.000000e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000000e+00 1.000000e+00 1.000000e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000000e+00 1.000000e+00 1.000001e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000001e+00 1.000002e+00 1.000002e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000006e+00 1.000007e+00 1.000009e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000023e+00 1.000029e+00 1.000034e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000092e+00 1.000114e+00 1.000137e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.000366e+00 1.000458e+00 1.000549e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.001466e+00 1.001833e+00 1.002199e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.005883e+00 1.007353e+00 1.008823e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.023819e+00 1.029765e+00 1.035711e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.100054e+00 1.124924e+00 1.149795e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 1.490149e+00 1.610098e+00 1.730046e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 5.914433e+00 7.068231e+00 8.222030e+00 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 2.405492e+03 2.955530e+03 3.505568e+03 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 7.592135e+13 9.328559e+13 1.106498e+14 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 7.535331e+55 9.258764e+55 1.098220e+56 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA 7.312333e+223 8.984763e+223 1.065719e+224 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA NaN NaN Inf 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA NaN NaN Inf 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA NaN NaN Inf 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA NaN NaN Inf 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA NaN NaN Inf 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA NaN NaN Inf 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA NaN NaN Inf 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA NaN NaN Inf 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA NaN NaN Inf 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA NaN NaN NaN 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s lA NaN NaN NaN 313s lAI 5.914433e+00 7.068231e+00 8.222030e+00 313s > ## Ensure that indeed expAtv(A, v) =.= expAtv(e*A, v, 1/e) for e > 0 313s > ## ----- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 313s > eAv[1,] 313s [1] 5.914433 7.068231 8.222030 313s > assert.EQ.mat(unname( eAv[rep(1, length(sc)), ]), 313s + unname( eAv[1+2*seq_along(sc), ] ), tol = 1e-14) 313s > # 64-bit lynne: 2.7e-16 !! 313s > 313s > sc.Atv <- function(A,v, s) { 313s + vapply(s, function(l) expAtv(l*A, v, t=1/l)$eAtv, v) 313s + } 313s > 313s > chk.sc.Atv <- function(A,v, s, tol=1e-15) { 313s + r <- vapply(s, function(l) expAtv(l*A, v, t=1/l)$eAtv, v) 313s + I <- expAtv(A,v)$eAtv 313s + if (!isTRUE(eq <- all.equal(as.vector(r), rep(I, length(s)), tolerance = tol))) 313s + stop("not all.equal() |-> ", eq) 313s + } 313s > 313s > chk.sc.Atv(A,v, sc, tol=1e-14) 313s > ## for information: see the precision: 313s > tryCatch( chk.sc.Atv(A,v, sc, tol= 0), error=identity)$message 313s [1] "not all.equal() |-> Mean relative difference: 2.618074e-16" 313s > 313s > 313s > A0 <- matrix( c(-3,1,2,1,-2,1,0,1,-1), nrow=3, byrow=TRUE) 313s > A1 <- A0 + 1e-16*rnorm(9) 313s > ## These two also failed originally 313s > chk.sc.Atv(A0, v=10^(1:3), s=sc, tol=1e-14) 313s > chk.sc.Atv(A1, v=rep(1,3), s=sc, tol=1e-14) 313s > 313s > set.seed(17) 313s > S <- rSpMatrix(29, density = 1/64) 313s > v <- round(100*rnorm(nrow(S))) 313s > if(FALSE) ## Error in balance(baP$z, "S") : 313s + ## BLAS/LAPACK routine 'DGEBAL' gave error code -3 313s + chk.sc.Atv(S/64, v, s=sc, tol=1e-14) 313s > if(FALSE) { 313s + ## after 313s + debug(chk.sc.Atv) 313s + ## this is revealing: 313s + image(as(relErrV(I, r),"sparseMatrix")) 313s + ## ==> 313s + sc[28:29] # are giving the largest differences 313s + } 313s > 313s 313s R version 4.4.3 (2025-02-28) -- "Trophy Case" 313s Copyright (C) 2025 The R Foundation for Statistical Computing 313s Platform: arm-unknown-linux-gnueabihf (32-bit) 313s 313s R is free software and comes with ABSOLUTELY NO WARRANTY. 313s You are welcome to redistribute it under certain conditions. 313s Type 'license()' or 'licence()' for distribution details. 313s 313s R is a collaborative project with many contributors. 313s Type 'contributors()' for more information and 313s 'citation()' on how to cite R or R packages in publications. 313s 313s Type 'demo()' for some demos, 'help()' for on-line help, or 313s 'help.start()' for an HTML browser interface to help. 313s Type 'q()' to quit R. 313s 313s > #### Examples where we know the result "exactly" 313s > 313s > library(expm) 313s Loading required package: Matrix 314s 314s Attaching package: ‘expm’ 314s 314s The following object is masked from ‘package:Matrix’: 314s 314s expm 314s 314s > 314s > options(digits = 4, width = 99, keep.source = FALSE) 314s > 314s > mSource <- function(file, ...) 314s + source(system.file(file, ..., package = "expm", mustWork=TRUE)) 314s > mSource("test-tools.R")## -> assertError(), rMat(), .. doExtras 314s Loading required package: tools 314s > mSource("demo", "exact-fn.R")# -> nilA3(), facMat(), m2ex3(), .... 314s > doExtras 314s [1] FALSE 314s > 314s > re.nilA3 <- function(xyz, EXPMlist) 314s + { 314s + stopifnot(is.list(EXPMlist)) 314s + r <- do.call(nilA3, as.list(xyz)) 314s + sapply(EXPMlist, function(Efn) relErr(r$expA, Efn(r$A))) 314s + } 314s > 314s > re.facMat <- function(n, EXPMlist, rFUN = rnorm, ...) 314s + { 314s + stopifnot(is.list(EXPMlist)) 314s + r <- facMat(n, rFUN, ...) 314s + vapply(EXPMlist, function(EXPM) { 314s + ct <- system.time(E <- EXPM(r$A), gcFirst = FALSE)[[1]] 314s + c(relErr = relErr(r$expA, E), c.time = ct) 314s + }, double(2)) 314s + } 314s > 314s > re.m2ex3 <- function(eps, EXPMlist) 314s + { 314s + stopifnot(is.list(EXPMlist)) 314s + r <- m2ex3(eps) 314s + sapply(EXPMlist, function(EXPM) relErr(r$expA, EXPM(r$A))) 314s + } 314s > 314s > ## check 1x1 matrices 314s > stopifnot( 314s + ## these had failed before 2017-03-28 (= Liselotte's 58-th birthday): 314s + all.equal(as.matrix(sqrtm(matrix(4))), matrix(2)) , 314s + all.equal(as.matrix(logm (matrix(pi))), matrix(log(pi))) , 314s + ## these had "always" worked : 314s + all.equal(as.matrix(expm (matrix(0))), matrix(1)) , 314s + all.equal(as.matrix(expm (matrix(1))), matrix(exp(1))) 314s + ) 314s > 314s > 314s > set.seed(321) 314s > re <- replicate(1000, 314s + c(re.nilA3(rlnorm(3),list(function(x)expm(x,"Pade"))), 314s + re.nilA3(rnorm(3), list(function(x)expm(x,"Pade"))))) 314s > 314s > summary(t(re)) 314s V1 V2 314s Min. :0.00e+00 Min. :0.00e+00 314s 1st Qu.:0.00e+00 1st Qu.:0.00e+00 314s Median :2.15e-17 Median :1.47e-17 314s Mean :3.15e-17 Mean :2.27e-17 314s 3rd Qu.:4.98e-17 3rd Qu.:3.61e-17 314s Max. :2.71e-16 Max. :1.29e-16 314s > stopifnot(rowMeans(re) < 1e-15, 314s + apply(re, 1, quantile, 0.80) < 1e-16, 314s + apply(re, 1, quantile, 0.90) < 2e-15, 314s + apply(re, 1, max) < c(4e-14, 6e-15)) 314s > 314s > showProc.time() 314s Time (user system elapsed): 0.376 0.023 0.4 314s > 314s > ## Check *many* random nilpotent 3 x 3 matrices: 314s > set.seed(321) 314s > RE <- replicate(1000, 314s + c(re.nilA3(rlnorm(3), list(function(x) expm(x, "Ward77"))), 314s + re.nilA3(rnorm(3), list(function(x) expm(x, "Ward77"))))) 315s > stopifnot(rowMeans(RE) < 1e-15, 315s + apply(RE, 1, quantile, 0.80) < 1e-16, 315s + apply(RE, 1, quantile, 0.90) < 2e-15, 315s + apply(RE, 1, max) < c(4e-14, 6e-15)) 315s > 315s > print(summary(t(RE))) 315s V1 V2 315s Min. :0.00e+00 Min. :0.00e+00 315s 1st Qu.:0.00e+00 1st Qu.:0.00e+00 315s Median :0.00e+00 Median :0.00e+00 315s Mean :1.49e-17 Mean :7.03e-18 315s 3rd Qu.:2.70e-17 3rd Qu.:5.20e-18 315s Max. :1.87e-16 Max. :7.52e-17 315s > epsC <- .Machine$double.eps 315s > cat("relErr(expm(.,Pade)) - relErr(expm(.,Ward77)) in Machine_eps units:\n") 315s relErr(expm(.,Pade)) - relErr(expm(.,Ward77)) in Machine_eps units: 315s > print(summary(c(re - RE)) / epsC) 315s Min. 1st Qu. Median Mean 3rd Qu. Max. 315s -0.8429 0.0000 0.0000 0.0727 0.1065 1.2215 315s > ## Min. 1st Qu. Median Mean 3rd Qu. Max. 315s > ## -0.6183442 0.0000000 0.0000000 1.3650410 0.1399719 94.9809161 315s > ## nb-mm3; ditto lynne (both x64), 2014-09-11: 315s > ## Min. 1st Qu. Median Mean 3rd Qu. Max. 315s > ## -0.8422 0.0000 0.0000 0.0725 0.1067 1.2205 315s > ## 32-bit [i686, florence, Linx 3.14.8-100.fc19..]: 315s > ## Min. 1st Qu. Median Mean 3rd Qu. Max. 315s > ## -0.62 0.00 0.00 1.36 0.14 95.93 315s > 315s > 315s > showProc.time() 315s Time (user system elapsed): 0.248 0 0.248 315s > 315s > ###--- A second group --- where we know the diagonalization of A --- 315s > 315s > if(!require("Matrix")) 315s + q('no') 315s > ## ------ the rest really uses 'Matrix' 315s > ##---> now use expm::expm() since Matrix has its own may mask the expm one 315s > ## ^^^^^^^^^^^^ 315s > 315s > (osV <- abbreviate(gsub("[^[:alnum:]]", '', sub("\\(.*", '', osVersion)), 12)) 315s UbuntuPluckyPuffin 315s "UbntPlckyPff" 315s > if(!dev.interactive(TRUE)) pdf(paste0("expm_exact-ex_", osV, ".pdf"), width = 9, height=5) 315s > ## 315s > myRversion <- paste(R.version.string, "--", osVersion) 315s > if((mach <- Sys.info()[["machine"]]) != "x86_64") 315s + myRversion <- paste0(myRversion, "_", mach) 315s > if(!capabilities("long.double")) 315s + myRversion <- paste0(myRversion, "_no_LDbl") 315s > myRversion 315s [1] "R version 4.4.3 (2025-02-28) -- Ubuntu Plucky Puffin (development branch)_armv7l_no_LDbl" 315s > ## in plots use mtext(myRversion, adj=1, cex=3/4) 315s > 315s > 315s > ## rMat() relies on Matrix::rcond(): 315s > ## Now with the change default rcondMin, this "works" 315s > R40 <- rMat(40) 315s > R80 <- rMat(80) 315s > showProc.time() 315s Time (user system elapsed): 0.066 0 0.065 315s > 315s > expm.safe.Eigen <- function(x, silent = FALSE) { 315s + r <- try(expm::expm(x, "R_Eigen"), silent = silent) 315s + if(inherits(r, "try-error")) NA else r 315s + } 315s > 315s > ## the S4 generic 315s > Matrix::expm 315s standardGeneric for "expm" defined from package "Matrix" 315s 315s function (x) 315s standardGeneric("expm") 315s 315s 315s Methods may be defined for arguments: x 315s Use showMethods(expm) for currently available ones. 315s > ## the dgeMatrix method - adapted to Matrix changes, had *more versatile* ..2dge() : 315s > expm.Matr.dge <- function(x) getDataPart(getMethod("expm", "dgeMatrix"))(Matrix::.m2dense(x)) 315s > 315s > expmList <- 315s + list(Matr = Matrix::expm, 315s + Matr.d = expm.Matr.dge, 315s + Ward = function(x) expm::expm(x, "Ward77"), 315s + Ward1b = function(x) expm::expm(x, "Ward77", preconditioning = "1bal"), 315s + RWard6 = function(x) expm::expm(x, "R_Ward77", order = 6), 315s + RWard7 = function(x) expm::expm(x, "R_Ward77", order = 7), 315s + RWard8 = function(x) expm::expm(x, "R_Ward77", order = 8), # default 315s + RWard9 = function(x) expm::expm(x, "R_Ward77", order = 9), 315s + s.P.s7 = function(x) expm::expm(x, "Pade", order = 7), 315s + s.POs7 = function(x) expm::expm(x, "PadeO",order = 7), 315s + s.P.s8 = function(x) expm::expm(x, "Pade" ,order = 8), # default 315s + s.POs8 = function(x) expm::expm(x, "PadeO",order = 8), # default 315s + s.P.s9 = function(x) expm::expm(x, "Pade", order = 9), 315s + s.POs9 = function(x) expm::expm(x, "PadeO",order = 9), 315s + s.P.sRBS = function(x) expm::expm(x, "PadeRBS"), 315s + Rs.P.s7 = function(x) expm::expm(x, "R_Pade", order = 7), 315s + Rs.P.s8 = function(x) expm::expm(x, "R_Pade", order = 8), # default 315s + Rs.P.s9 = function(x) expm::expm(x, "R_Pade", order = 9), 315s + sPs.H08. = function(x) expm:: expm.Higham08(x, balancing=FALSE), 315s + sPs.H08b = function(x) expm:: expm.Higham08(x, balancing= TRUE), 315s + ## AmHi09.06= function(x) expm:::expm.AlMoHi09(x, p = 6), 315s + AmHi09.07= function(x) expm:::expm.AlMoHi09(x, p = 7), 315s + AmHi09.08= function(x) expm:::expm.AlMoHi09(x, p = 8), # default -- really sub optimal 315s + AmHi09.09= function(x) expm:::expm.AlMoHi09(x, p = 9), 315s + AmHi09.10= function(x) expm:::expm.AlMoHi09(x, p = 10), 315s + AmHi09.11= function(x) expm:::expm.AlMoHi09(x, p = 11), 315s + AmHi09.12= function(x) expm:::expm.AlMoHi09(x, p = 12), 315s + AmHi09.13= function(x) expm:::expm.AlMoHi09(x, p = 13), 315s + s.T.s7 = function(x) expm::expm(x, "Taylor", order = 7), 315s + s.TOs7 = function(x) expm::expm(x, "TaylorO",order = 7), 315s + s.T.s8 = function(x) expm::expm(x, "Taylor", order = 8), # default 315s + s.TOs8 = function(x) expm::expm(x, "TaylorO",order = 8), # default 315s + s.T.s9 = function(x) expm::expm(x, "Taylor", order = 9), 315s + s.TOs9 = function(x) expm::expm(x, "TaylorO",order = 9), 315s + Eigen = expm.safe.Eigen, # "R_Eigen" 315s + hybrid = function(x) expm::expm(x, "hybrid") 315s + ) 315s > 315s > 315s > ## set.seed(12) 315s > ## facMchk <- replicate(if(doExtras) 100 else 20, facMat(20, rnorm)) 315s > set.seed(12) 315s > fRE <- replicate(if(doExtras) 100 else 20, 315s + re.facMat(20, expmList)) # if(doExtras) gives one "No Matrix found ..." warning 315s > nDig <- -log10(t(fRE["relErr",,])) 315s > cat("Number of correct decimal digits for facMat(20, rnorm):\n") 315s Number of correct decimal digits for facMat(20, rnorm): 315s > t(apply(nDig, 2, summary)) 315s Min. 1st Qu. Median Mean 3rd Qu. Max. 315s Matr 13.681 14.19 14.29 14.32 14.53 14.73 315s Matr.d 13.681 14.19 14.29 14.32 14.53 14.73 315s Ward 13.681 14.19 14.29 14.32 14.53 14.73 315s Ward1b 13.681 14.19 14.29 14.32 14.53 14.73 315s RWard6 13.244 13.82 13.98 13.95 14.09 14.32 315s RWard7 13.629 13.82 13.96 13.96 14.11 14.32 315s RWard8 13.333 13.80 13.91 13.91 14.11 14.22 315s RWard9 13.522 13.74 13.82 13.90 14.12 14.23 315s s.P.s7 12.582 13.05 13.24 13.22 13.42 13.50 315s s.POs7 12.582 13.05 13.24 13.22 13.42 13.50 315s s.P.s8 12.825 13.15 13.24 13.25 13.32 13.63 315s s.POs8 12.825 13.15 13.24 13.25 13.32 13.63 315s s.P.s9 12.764 13.15 13.30 13.23 13.37 13.50 315s s.POs9 12.764 13.15 13.30 13.23 13.37 13.50 315s s.P.sRBS 13.918 14.29 14.45 14.42 14.56 14.77 315s Rs.P.s7 13.452 13.79 13.88 13.91 14.06 14.28 315s Rs.P.s8 13.359 13.80 13.91 13.92 14.05 14.31 315s Rs.P.s9 13.364 13.73 13.90 13.90 14.04 14.35 315s sPs.H08. 14.379 14.81 14.92 14.89 14.99 15.23 315s sPs.H08b 14.379 14.83 14.94 14.92 15.04 15.23 315s AmHi09.07 8.618 10.09 10.54 11.03 12.36 13.39 315s AmHi09.08 9.782 11.27 11.72 12.19 13.56 14.40 315s AmHi09.09 12.000 13.89 14.24 14.07 14.63 15.01 315s AmHi09.10 13.434 14.57 14.71 14.64 14.84 15.01 315s AmHi09.11 14.512 14.67 14.77 14.81 14.91 15.15 315s AmHi09.12 14.512 14.67 14.77 14.81 14.91 15.17 315s AmHi09.13 14.512 14.67 14.77 14.81 14.91 15.17 315s s.T.s7 13.020 13.43 13.51 13.53 13.71 13.90 315s s.TOs7 13.020 13.43 13.51 13.53 13.71 13.90 315s s.T.s8 13.020 13.43 13.51 13.53 13.71 13.90 315s s.TOs8 13.020 13.43 13.51 13.53 13.71 13.90 315s s.T.s9 13.020 13.43 13.51 13.53 13.71 13.90 315s s.TOs9 13.020 13.43 13.51 13.53 13.71 13.90 315s Eigen 14.205 14.33 14.51 14.47 14.58 14.63 315s hybrid 14.236 14.32 14.49 14.47 14.58 14.63 315s > 315s > ## Now look at that: 315s > eaxis <- if(requireNamespace("sfsmisc")) sfsmisc::eaxis else axis 315s Loading required namespace: sfsmisc 315s > op <- par(mar=.1 + c(5,4 + 1.5, 4,2)) 315s > boxplot(t(fRE["relErr",,]), log="x", xaxt="n", 315s + notch=TRUE, ylim = c(8e-16, 4e-9), 315s + horizontal=TRUE, las = 1, 315s + main = "relative errors for 'random' eigen-ok 20 x 20 matrix") 315s Warning message: 315s In (function (z, notch = FALSE, width = NULL, varwidth = FALSE, : 315s some notches went outside hinges ('box'): maybe set notch=FALSE 315s > eaxis(1); grid(lty = 3); mtext(myRversion, adj=1, cex=3/4) 315s > par(op) 315s > 315s > showProc.time() 315s Time (user system elapsed): 0.562 0.019 0.582 315s > 315s > if(doExtras) withAutoprint({ # also "large" n = 100 ------------------------------------------ 315s + str(rf100 <- replicate(20, re.facMat(100, expmList))) 315s + 1000*t(apply(rf100["c.time",,], 1, summary)) 315s + ## lynne {Linux 2.6.34.7-56.fc13.x86_64 --- AMD Phenom II X4 925}: 315s + ## Min. 1st Qu. Median Mean 3rd Qu. Max. 315s + ## Ward 23 24 24.5 24.4 25.0 25 315s + ## s.P.s 107 109 109.0 109.0 109.0 112 315s + ## s.POs 188 190 191.0 192.0 193.0 198 315s + ## s.P.sRBS 17 18 19.0 18.9 19.2 21 315s + ## sPs.H08. 15 17 18.0 17.6 18.0 19 315s + ## sPs.H08b 18 18 19.0 23.4 20.0 107 315s + ## s.T.s 44 45 45.0 45.6 46.0 48 315s + ## s.TOs 96 98 99.0 100.0 100.0 116 315s + ## Eigen 18 19 20.0 24.4 21.0 109 315s + ## hybrid 40 42 42.0 47.1 44.0 133 315s + 315s + nDig <- -log10(t(rf100["relErr",,])) 315s + cat("Number of correct decimal digits for facMat(100, rnorm):\n") 315s + t(apply(nDig, 2, summary)) 315s + 315s + ##--> take out the real slow ones for the subsequent tests: 315s + (not.slow <- grep("^s\\.[PT]", names(expmList), invert = TRUE, value = TRUE)) 315s + 315s + set.seed(18) ## 12 replicates is too small .. but then it's too slow otherwise: 315s + rf400 <- replicate(12, re.facMat(400, expmList[not.slow])) 315s + 315s + showProc.time() 315s + 1000*t(apply(rf400["c.time",,], 1, summary)) 315s + ## lynne: 315s + ## Min. 1st Qu. Median Mean 3rd Qu. Max. 315s + ## Ward 1740 1790 1830 1820 1860 1900 315s + ## s.P.sRBS 1350 1420 1440 1430 1450 1460 315s + ## sPs.H08. 1020 1030 1130 1140 1210 1290 315s + ## sPs.H08b 1120 1130 1220 1220 1300 1390 315s + ## Eigen 962 977 989 992 1000 1030 315s + ## hybrid 2740 2800 2840 2840 2890 2910 315s + 315s + nDig <- -log10(t(rf400["relErr",,])) 315s + cat("Number of correct decimal digits for (12 rep. of) facMat(400, rnorm):\n") 315s + t(apply(nDig, 2, summary)) 315s + 315s + }) else { # *not* (doExtras) ----------------------------------------------------------------- 315s + ## times (in millisec): 315s + print(1000*t(apply(fRE["c.time",,], 1, summary))) 315s + } 315s Min. 1st Qu. Median Mean 3rd Qu. Max. 315s Matr 0 0.00 0.0 0.35 1.00 1 315s Matr.d 0 0.00 0.5 0.65 1.00 3 315s Ward 0 0.00 0.0 0.45 1.00 2 315s Ward1b 0 0.00 0.0 0.35 1.00 2 315s RWard6 0 0.00 1.0 0.70 1.00 2 315s RWard7 0 0.00 0.0 0.50 1.00 2 315s RWard8 0 0.00 0.0 0.45 1.00 3 315s RWard9 0 0.00 0.0 0.45 1.00 2 315s s.P.s7 0 1.00 1.0 1.00 1.00 3 315s s.POs7 0 0.75 1.0 0.80 1.00 2 315s s.P.s8 0 1.00 1.0 1.00 1.00 3 315s s.POs8 0 0.00 1.0 0.75 1.00 2 315s s.P.s9 0 1.00 1.0 0.95 1.00 3 315s s.POs9 0 1.00 1.0 0.85 1.00 2 315s s.P.sRBS 0 0.00 0.0 0.30 0.25 2 315s Rs.P.s7 0 0.00 1.0 0.65 1.00 2 315s Rs.P.s8 0 0.00 0.0 0.30 0.25 2 315s Rs.P.s9 0 0.00 0.0 0.30 0.25 2 315s sPs.H08. 0 0.00 1.0 0.65 1.00 2 315s sPs.H08b 0 0.00 0.0 0.35 1.00 1 315s AmHi09.07 0 0.00 0.0 0.20 0.00 2 315s AmHi09.08 0 0.00 0.0 0.25 0.25 1 315s AmHi09.09 0 0.00 0.0 0.30 1.00 1 315s AmHi09.10 0 0.00 0.0 0.15 0.00 2 315s AmHi09.11 0 0.00 0.0 0.15 0.00 1 315s AmHi09.12 0 0.00 0.0 0.25 0.25 1 315s AmHi09.13 0 0.00 0.0 0.35 1.00 2 315s s.T.s7 0 0.00 0.0 0.50 1.00 2 315s s.TOs7 0 0.00 0.0 0.35 1.00 2 315s s.T.s8 0 0.00 0.0 0.45 1.00 2 315s s.TOs8 0 0.00 0.0 0.40 1.00 2 315s s.T.s9 0 0.00 0.0 0.50 1.00 2 315s s.TOs9 0 0.00 0.0 0.50 1.00 2 315s Eigen 0 1.00 1.0 1.00 1.00 5 315s hybrid 0 0.00 0.0 0.40 1.00 2 315s > 315s > ## Now try an example with badly conditioned "random" M matrix... 315s > ## ... 315s > ## ... (not yet -- TODO?) 315s > 315s > ### m2ex3() --- The 2x2 example with bad condition , see A3 in ./ex2.R 315s > 315s > RE <- re.m2ex3(1e-8, expmList) 315s > sort(RE)# Ward + both sps.H08 are best; s.P.s fair, Eigen (and hybrid): ~1e-9 315s RWard6 RWard7 RWard8 RWard9 s.P.sRBS Matr Matr.d Ward Ward1b 315s 5.030e-17 5.030e-17 5.030e-17 5.030e-17 5.030e-17 5.030e-17 5.030e-17 5.030e-17 5.030e-17 315s Rs.P.s9 sPs.H08. sPs.H08b AmHi09.13 AmHi09.12 Rs.P.s8 Rs.P.s7 s.P.s8 s.POs8 315s 5.030e-17 5.030e-17 5.030e-17 2.012e-16 3.018e-16 7.042e-16 7.545e-16 2.062e-15 2.062e-15 315s s.P.s9 s.POs9 s.T.s8 s.TOs8 s.T.s9 s.TOs9 s.P.s7 s.POs7 s.T.s7 315s 2.062e-15 2.062e-15 2.062e-15 2.062e-15 2.062e-15 2.062e-15 2.163e-15 2.163e-15 2.565e-15 315s s.TOs7 AmHi09.11 AmHi09.10 AmHi09.09 Eigen hybrid AmHi09.08 AmHi09.07 315s 2.565e-15 1.368e-14 2.325e-12 6.032e-11 1.836e-09 1.836e-09 4.819e-09 6.717e-08 315s > 315s > eps <- 10^-(1:18) 315s > t.m2 <- t(sapply(eps, re.m2ex3, EXPMlist = expmList)) 315s Error in solve.default(V) : 315s system is computationally singular: reciprocal condition number = 1.11022e-16 315s Error in solve.default(V) : 315s system is computationally singular: reciprocal condition number = 1.11022e-16 315s Error in solve.default(V) : 315s system is computationally singular: reciprocal condition number = 1.11022e-16 315s > ## --> 3 error messages from solve(V), 5 error messages from try(. "R_Eigen" ...) 315s > 315s > showProc.time() 315s Time (user system elapsed): 0.189 0.001 0.19 315s > 315s > cbind(sort(apply(log(t.m2),2, median, na.rm=TRUE))) 315s [,1] 315s RWard6 -Inf 315s RWard7 -Inf 315s RWard8 -Inf 315s RWard9 -Inf 315s sPs.H08. -86.05 315s sPs.H08b -86.05 315s Rs.P.s9 -85.70 315s Matr -83.62 315s Matr.d -83.62 315s Ward -83.62 315s Ward1b -83.62 315s s.P.sRBS -81.20 315s AmHi09.13 -36.43 315s AmHi09.12 -35.92 315s Rs.P.s8 -34.82 315s Rs.P.s7 -34.76 315s s.P.s8 -33.79 315s s.POs8 -33.79 315s s.P.s9 -33.79 315s s.POs9 -33.79 315s s.T.s8 -33.79 315s s.TOs8 -33.79 315s s.T.s9 -33.79 315s s.TOs9 -33.79 315s s.P.s7 -33.74 315s s.POs7 -33.74 315s s.T.s7 -33.58 315s s.TOs7 -33.58 315s AmHi09.11 -31.92 315s AmHi09.10 -26.79 315s hybrid -23.74 315s AmHi09.09 -23.53 315s Eigen -20.12 315s AmHi09.08 -19.15 315s AmHi09.07 -16.52 315s > ## 'na.rm=TRUE' needed for Eigen which blows up for the last 3 eps 315s > t.m2.ranks <- sort(rowMeans(apply(t.m2, 1, rank))) 315s > cbind(signif(t.m2.ranks, 3)) 315s [,1] 315s RWard6 3.39 315s RWard7 3.47 315s RWard8 3.50 315s RWard9 3.97 315s sPs.H08. 6.92 315s sPs.H08b 6.92 315s s.P.sRBS 8.06 315s Matr 10.10 315s Matr.d 10.10 315s Ward 10.10 315s Ward1b 10.10 315s AmHi09.13 11.00 315s Rs.P.s9 11.20 315s AmHi09.12 13.20 315s Rs.P.s8 14.80 315s Rs.P.s7 15.90 315s s.T.s9 19.30 315s s.TOs9 19.30 315s s.T.s8 19.70 315s s.TOs8 19.70 315s s.P.s9 21.70 315s s.POs9 21.70 315s s.P.s8 22.60 315s s.POs8 22.60 315s s.P.s7 25.40 315s s.POs7 25.40 315s s.T.s7 25.90 315s s.TOs7 25.90 315s hybrid 27.00 315s AmHi09.11 29.40 315s AmHi09.10 30.70 315s Eigen 31.80 315s AmHi09.09 31.80 315s AmHi09.08 33.10 315s AmHi09.07 34.20 315s > ## lynne (x86_64, Linux 3.14.4-100; Intel i7-4765T), 2014-09: 315s > ## sPs.H08. 2.67 315s > ## sPs.H08b 2.67 315s > ## s.P.sRBS 3.06 315s > ## Ward 4.03 315s > ## AmHi09.13 4.33 <<- still not close to H08 ! 315s > ## AmHi09.12 5.86 315s > ## s.T.s 8.33 315s > ## s.TOs 8.33 315s > ## s.P.s 9.11 315s > ## s.POs 9.11 315s > ## hybrid 10.80 315s > ## AmHi09.10 11.70 << astonishingly bad 315s > ## Eigen 12.60 315s > ## AmHi09.08 13.10 315s > ## AmHi09.06 14.40 315s > 315s > print(t.m2[, names(t.m2.ranks)[1:8]], digits = 3) 315s RWard6 RWard7 RWard8 RWard9 sPs.H08. sPs.H08b s.P.sRBS Matr 315s [1,] 1.01e-16 1.51e-16 1.00e-16 2.01e-16 9.99e-17 9.99e-17 2.00e-16 6.02e-16 315s [2,] 2.01e-16 5.03e-17 5.03e-17 5.03e-17 1.01e-16 1.01e-16 2.01e-16 5.53e-16 315s [3,] 0.00e+00 1.01e-16 5.03e-17 5.03e-17 5.03e-17 5.03e-17 2.51e-16 3.02e-16 315s [4,] 0.00e+00 0.00e+00 7.50e-25 7.50e-25 2.51e-16 2.51e-16 3.75e-25 1.51e-16 315s [5,] 0.00e+00 1.17e-26 5.86e-27 1.17e-26 3.52e-16 3.52e-16 2.01e-16 1.51e-16 315s [6,] 5.03e-17 5.03e-17 4.57e-29 0.00e+00 2.01e-16 2.01e-16 3.52e-16 3.52e-16 315s [7,] 0.00e+00 0.00e+00 1.51e-16 1.51e-16 3.52e-16 3.52e-16 2.51e-16 5.03e-16 315s [8,] 5.03e-17 5.03e-17 5.03e-17 5.03e-17 5.03e-17 5.03e-17 5.03e-17 5.03e-17 315s [9,] 0.00e+00 0.00e+00 0.00e+00 0.00e+00 4.36e-35 4.36e-35 4.36e-35 4.36e-35 315s [10,] 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 6.82e-37 0.00e+00 315s [11,] 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 5.33e-39 5.33e-39 315s [12,] 0.00e+00 0.00e+00 0.00e+00 0.00e+00 4.16e-41 4.16e-41 0.00e+00 4.16e-41 315s [13,] 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 6.50e-43 6.50e-43 315s [14,] 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 5.08e-45 5.08e-45 315s [15,] 0.00e+00 0.00e+00 0.00e+00 0.00e+00 3.97e-47 3.97e-47 7.94e-47 7.94e-47 315s [16,] 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 6.20e-49 6.20e-49 315s [17,] 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 4.84e-51 0.00e+00 315s [18,] 0.00e+00 0.00e+00 0.00e+00 0.00e+00 3.78e-53 3.78e-53 0.00e+00 3.78e-53 315s > ## ==> 1st class: H08 (both) and (but slightly better than) Ward 315s > ## 2nd class s.T.s and s.P.s 315s > ## "bad" : hybrid and Eigen 315s > 315s > ## ??? AmHi09 - methods, up to order = 10 are worse ! 315s > if(require(RColorBrewer)) { 315s + ## Bcol <- brewer.pal(ncol(t.m2),"Dark2") 315s Loading required package: RColorBrewer 315s + Bcol <- brewer.pal(min(9, ncol(t.m2)), "Set1") 315s + Bcol <- Bcol[sqrt(colSums(col2rgb(Bcol)^2)) < 340] 315s + ## FIXME: more colors ==> ~/R/MM/GRAPHICS/color-palettes.R 315s + } else { 315s + ## 7 from Dark2 315s + ## Bcol <- c("#1B9E77", "#D95F02", "#7570B3", "#E7298A", 315s + ## "#66A61E", "#E6AB02", "#A6761D") 315s + ## Rather: those from "Set1" 315s + Bcol <- c("#E41A1C", "#377EB8", "#4DAF4A", 315s + "#984EA3", "#FF7F00", # too bright: "#FFFF33", 315s + "#A65628", "#F781BF", "#999999") 315s + } 315s > 315s > matplot(eps, t.m2, type = "b", log = "xy", col=Bcol, lty = 1:9, pch=1:15, 315s + axes=FALSE, frame = TRUE, 315s + xlab = expression(epsilon), ylab = "relative error", 315s + main = expression(expm(A, method == "*") *" relative errors for " * 315s + A == bgroup("[", atop({-1} *" "* 1, {epsilon^2} *" "*{-1}), "]"))) 315s Warning messages: 315s 1: In xy.coords(x, y, xlabel, ylabel, log = log, recycle = TRUE) : 315s 72 y values <= 0 omitted from logarithmic plot 315s 2: In xy.coords(x, y, xlabel, ylabel, log) : 315s 2 y values <= 0 omitted from logarithmic plot 315s > legend("bottomright",colnames(t.m2), col=Bcol, lty = 1:9, pch=1:15, 315s + inset = 0.02) 315s > if(requireNamespace("sfsmisc")) { 315s + sfsmisc::eaxis(1, labels=FALSE) 315s + sfsmisc::eaxis(1, at = eps[c(TRUE,FALSE)]) 315s + sfsmisc::eaxis(2) 315s + ## sfsmisc::eaxis(2, labels=FALSE) 315s + ## op <- par(las=2) 315s + ## sfsmisc::eaxis(2, at = axTicks(2,log=TRUE)[c(TRUE,FALSE,FALSE)]) 315s + ## par(op) 315s + } else { 315s + axis(1) 315s + axis(2) 315s + } 315s > 315s > ## typical case: 315s > ep <- 1e-10 315s > (me <- m2ex3(ep)) 315s $A 315s [,1] [,2] 315s [1,] -1e+00 1 315s [2,] 1e-20 -1 315s 315s $expA 315s [,1] [,2] 315s [1,] 3.679e-01 0.3679 315s [2,] 3.679e-21 0.3679 315s 315s > me$expA * exp(1) ## the correct value ; numerically identical to simple matrix: 315s [,1] [,2] 315s [1,] 1e+00 1 315s [2,] 1e-20 1 315s > ## identical() not fulfilled e.g. on Solaris 315s > stopifnot(all.equal(me$expA * exp(1), 315s + rbind(c( 1, 1), 315s + c(ep^2, 1)), 315s + tolerance = 1e-14)) 315s > ## The relative error (matrices): 315s > lapply(expmList, function(EXPM) 1 - EXPM(me$A)/me$expA) 315s $Matr 315s 2 x 2 Matrix of class "dgeMatrix" 315s [,1] [,2] 315s [1,] 0 0 315s [2,] 0 0 315s 315s $Matr.d 315s 2 x 2 Matrix of class "dgeMatrix" 315s [,1] [,2] 315s [1,] 0 0 315s [2,] 0 0 315s 315s $Ward 315s [,1] [,2] 315s [1,] 0 0 315s [2,] 0 0 315s 315s $Ward1b 315s [,1] [,2] 315s [1,] 0 0 315s [2,] 0 0 315s 315s $RWard6 315s [,1] [,2] 315s [1,] 0 0 315s [2,] 0 0 315s 315s $RWard7 315s [,1] [,2] 315s [1,] 0 0 315s [2,] 0 0 315s 315s $RWard8 315s [,1] [,2] 315s [1,] 0 0 315s [2,] 0 0 315s 315s $RWard9 315s [,1] [,2] 315s [1,] 0 0 315s [2,] 0 0 315s 315s $s.P.s7 315s [,1] [,2] 315s [1,] -2.22e-15 -2.442e-15 315s [2,] -2.22e-15 -2.220e-15 315s attr(,"accuracy") 315s [1] 2.998e-15 315s 315s $s.POs7 315s [,1] [,2] 315s [1,] -2.22e-15 -2.442e-15 315s [2,] -2.22e-15 -2.220e-15 315s attr(,"accuracy") 315s [1] 2.998e-15 315s 315s $s.P.s8 315s [,1] [,2] 315s [1,] -2.22e-15 -2.22e-15 315s [2,] -2.22e-15 -2.22e-15 315s attr(,"accuracy") 315s [1] 1.665e-16 315s 315s $s.POs8 315s [,1] [,2] 315s [1,] -2.22e-15 -2.22e-15 315s [2,] -2.22e-15 -2.22e-15 315s attr(,"accuracy") 315s [1] 1.665e-16 315s 315s $s.P.s9 315s [,1] [,2] 315s [1,] -2.22e-15 -2.22e-15 315s [2,] -2.22e-15 -2.22e-15 315s attr(,"accuracy") 315s [1] 4.19e-15 315s 315s $s.POs9 315s [,1] [,2] 315s [1,] -2.22e-15 -2.22e-15 315s [2,] -2.22e-15 -2.22e-15 315s attr(,"accuracy") 315s [1] 4.19e-15 315s 315s $s.P.sRBS 315s [,1] [,2] 315s [1,] 0.00e+00 0 315s [2,] -2.22e-16 0 315s 315s $Rs.P.s7 315s [,1] [,2] 315s [1,] -6.661e-16 -8.882e-16 315s [2,] -8.882e-16 -6.661e-16 315s 315s $Rs.P.s8 315s [,1] [,2] 315s [1,] -6.661e-16 -6.661e-16 315s [2,] -8.882e-16 -6.661e-16 315s 315s $Rs.P.s9 315s [,1] [,2] 315s [1,] 0.00e+00 0 315s [2,] 2.22e-16 0 315s 315s $sPs.H08. 315s [,1] [,2] 315s [1,] 0 0 315s [2,] 0 0 315s 315s $sPs.H08b 315s [,1] [,2] 315s [1,] 0 0 315s [2,] 0 0 315s 315s $AmHi09.07 315s [,1] [,2] 315s [1,] 1.999e-08 -1.615e-07 315s [2,] -1.615e-07 1.999e-08 315s 315s $AmHi09.08 315s [,1] [,2] 315s [1,] -1.414e-09 1.163e-08 315s [2,] 1.163e-08 -1.414e-09 315s 315s $AmHi09.09 315s [,1] [,2] 315s [1,] 1.497e-11 -1.510e-10 315s [2,] -1.510e-10 1.497e-11 315s 315s $AmHi09.10 315s [,1] [,2] 315s [1,] -5.702e-13 5.836e-12 315s [2,] 5.836e-12 -5.702e-13 315s 315s $AmHi09.11 315s [,1] [,2] 315s [1,] 2.998e-15 -3.508e-14 315s [2,] -3.486e-14 2.998e-15 315s 315s $AmHi09.12 315s [,1] [,2] 315s [1,] 1.110e-16 4.441e-16 315s [2,] 7.772e-16 1.110e-16 315s 315s $AmHi09.13 315s [,1] [,2] 315s [1,] 1.11e-16 1.11e-16 315s [2,] 2.22e-16 1.11e-16 315s 315s $s.T.s7 315s [,1] [,2] 315s [1,] 1.776e-15 -4.219e-15 315s [2,] -4.219e-15 1.776e-15 315s attr(,"accuracy") 315s [1] 2.22e-15 315s 315s $s.TOs7 315s [,1] [,2] 315s [1,] 1.776e-15 -4.219e-15 315s [2,] -4.219e-15 1.776e-15 315s attr(,"accuracy") 315s [1] 2.22e-15 315s 315s $s.T.s8 315s [,1] [,2] 315s [1,] -2.22e-15 -2.22e-15 315s [2,] -2.22e-15 -2.22e-15 315s attr(,"accuracy") 315s [1] 0 315s 315s $s.TOs8 315s [,1] [,2] 315s [1,] -2.22e-15 -2.22e-15 315s [2,] -2.22e-15 -2.22e-15 315s attr(,"accuracy") 315s [1] 0 315s 315s $s.T.s9 315s [,1] [,2] 315s [1,] -2.22e-15 -2.22e-15 315s [2,] -2.22e-15 -2.22e-15 315s attr(,"accuracy") 315s [1] 0 315s 315s $s.TOs9 315s [,1] [,2] 315s [1,] -2.22e-15 -2.22e-15 315s [2,] -2.22e-15 -2.22e-15 315s attr(,"accuracy") 315s [1] 0 315s 315s $Eigen 315s [,1] [,2] 315s [1,] 0.00e+00 -5.109e-07 315s [2,] -1.12e-06 0.000e+00 315s 315s $hybrid 315s [,1] [,2] 315s [1,] 0.000e+00 -5.109e-07 315s [2,] -2.419e-07 -2.220e-16 315s 315s > 315s > ## Average number of correct digits [less "extreme" than plot above] 315s > nDig <- sapply(expmList, function(EXPM) -log10(mean(abs(1 - EXPM(me$A)/me$expA)))) 315s > round(nDig, 2) 315s Matr Matr.d Ward Ward1b RWard6 RWard7 RWard8 RWard9 s.P.s7 315s Inf Inf Inf Inf Inf Inf Inf Inf 14.64 315s s.POs7 s.P.s8 s.POs8 s.P.s9 s.POs9 s.P.sRBS Rs.P.s7 Rs.P.s8 Rs.P.s9 315s 14.64 14.65 14.65 14.65 14.65 16.26 15.11 15.14 16.26 315s sPs.H08. sPs.H08b AmHi09.07 AmHi09.08 AmHi09.09 AmHi09.10 AmHi09.11 AmHi09.12 AmHi09.13 315s Inf Inf 7.04 8.19 10.08 11.49 13.72 15.44 15.86 315s s.T.s7 s.TOs7 s.T.s8 s.TOs8 s.T.s9 s.TOs9 Eigen hybrid 315s 14.52 14.52 14.65 14.65 14.65 14.65 6.39 6.73 315s > ## Ward s.P.s s.POs s.T.s s.TOs Eigen hybrid 315s > ## 16.26 14.65 14.65 14.65 14.65 6.20 6.39 [AMD Opteron 64-bit] 315s > ## Inf 14.65 14.65 14.65 14.65 6.74 6.33 [Pentium-M (32-bit)] 315s > 315s > showProc.time() 315s Time (user system elapsed): 0.063 0.005 0.067 315s > 315s > ###--- rnilMat() : random upper triangular (zero-diagonal) nilpotent n x n matrix 315s > 315s > set.seed(17) 315s > m <- rnilMat(10) 315s > (m. <- as(m,"sparseMatrix"))# for nicer printing - and more *below* 315s 10 x 10 sparse Matrix of class "dtCMatrix" 315s 315s [1,] . 3 10 7 3 4 9 5 9 6 315s [2,] . . 5 4 3 . 5 6 3 6 315s [3,] . . . 5 7 7 3 7 5 6 315s [4,] . . . . 3 7 6 8 2 7 315s [5,] . . . . . 9 5 2 7 6 315s [6,] . . . . . . 8 5 4 6 315s [7,] . . . . . . . 5 5 3 315s [8,] . . . . . . . . 3 5 315s [9,] . . . . . . . . . 3 315s [10,] . . . . . . . . . . 315s > E.m <- expm::expm(m, method="Pade") 315s > as(E.m, "sparseMatrix") 315s 10 x 10 sparse Matrix of class "dtCMatrix" 315s 315s [1,] 1 3 17.5 50.5 110.9 464.7 1224.0 2169.2 3394.8 5938.8 315s [2,] . 1 5.0 16.5 39.0 172.8 476.1 865.6 1376.4 2438.8 315s [3,] . . 1.0 5.0 14.5 78.5 251.7 498.6 836.0 1540.0 315s [4,] . . . 1.0 3.0 20.5 77.5 170.2 299.4 578.0 315s [5,] . . . . 1.0 9.0 41.0 97.0 180.5 357.1 315s [6,] . . . . . 1.0 8.0 25.0 51.5 112.3 315s [7,] . . . . . . 1.0 5.0 12.5 30.5 315s [8,] . . . . . . . 1.0 3.0 9.5 315s [9,] . . . . . . . . 1.0 3.0 315s [10,] . . . . . . . . . 1.0 315s > 315s > (dN <- 9*7*320) # 20160 315s [1] 20160 315s > stopifnot(abs(round(E.m * dN) - (E.m * dN)) < 9e-6) 315s > EmN <- matrix(c(dN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 315s + 3*dN, dN, 0, 0, 0, 0, 0, 0, 0, 0, 315s + 352800, 5*dN, dN, 0, 0, 0, 0, 0, 0, 0, 315s + 1018080, 332640, 5*dN, dN, 0, 0, 0, 0, 0, 0, 315s + 2235240, 786240, 292320, 3*dN, dN, 0, 0, 0, 0, 0, 315s + 9368520, 3483480, 1582560, 413280, 181440, dN, 0, 0, 0, 0, 315s + 24676176, 9598680, 5073600, 1562400, 826560, 161280, dN, 0,0,0, 315s + 43730160, 17451000, 10051440, 3430560, 1955520, 504000, 315s + 5*dN, dN, 0, 0, 315s + 68438436, 27747480, 16853760, 6036240, 3638880, 1038240, 315s + 252000, 3*dN, dN, 0, 315s + 119725855, 49165892, 31046760, 11652480, 7198800, 2264640, 315s + 614880, 191520, 3*dN, dN), 315s + 10, 10) 315s > 315s > Em.xct <- EmN / dN 315s > all.equal(E.m, Em.xct, check.attributes = FALSE, tolerance = 0) 315s [1] "Mean relative difference: 1.549e-16" 315s > stopifnot(all.equal(E.m, Em.xct, check.attributes = FALSE, tolerance= 1e-13)) 315s > 315s > re.x <- sapply(expmList, function(EXPM) relErr(Em.xct, EXPM(m))) 315s Error in solve.default(V) : 315s Lapack routine dgesv: system is exactly singular: U[3,3] = 0 315s > ## with error message from "safe.Eigen" --> Eigen is NA here 315s > ## result depends quite a bit on platform 315s > which(is.na(re.x)) # gives c(Eigen = 16L) (but not everywhere ?!?) 315s Eigen 315s 34 315s > (re.x <- re.x[!is.na(re.x)]) 315s Matr Matr.d Ward Ward1b RWard6 RWard7 RWard8 RWard9 s.P.s7 315s 4.660e-17 4.660e-17 4.660e-17 4.660e-17 8.435e-17 7.020e-17 5.368e-17 8.435e-17 7.145e-17 315s s.POs7 s.P.s8 s.POs8 s.P.s9 s.POs9 s.P.sRBS Rs.P.s7 Rs.P.s8 Rs.P.s9 315s 7.145e-17 3.989e-17 3.989e-17 1.638e-16 1.638e-16 4.424e-17 7.020e-17 5.368e-17 8.435e-17 315s sPs.H08. sPs.H08b AmHi09.07 AmHi09.08 AmHi09.09 AmHi09.10 AmHi09.11 AmHi09.12 AmHi09.13 315s 1.103e-16 1.103e-16 2.377e-16 8.671e-17 8.671e-17 8.671e-17 8.671e-17 8.671e-17 8.671e-17 315s s.T.s7 s.TOs7 s.T.s8 s.TOs8 s.T.s9 s.TOs9 hybrid 315s 8.435e-17 8.435e-17 8.435e-17 8.435e-17 8.435e-17 8.435e-17 4.660e-17 315s > 315s > ## Pentium-M 32-bit ubuntu gave 315s > ## Ward s.P.s s.POs sPs.H08. sPs.H08b s.T.s s.TOs hybrid 315s > ## 1.079e-16 4.505e-14 4.503e-14 9.379e-17 9.379e-17 3.716e-17 7.079e-18 1.079e-16 315s > ## 32-bit Quad-Core AMD Opteron 2380 (Linux 2.6.30.10-105.2.23.fc11.i686.PAE): 315s > ## Ward s.P.s s.POs sPs.H08. sPs.H08b s.T.s s.TOs hybrid 315s > ## 1.079e-16 4.505e-14 4.503e-14 9.379e-17 9.379e-17 3.716e-17 7.079e-18 1.079e-16 315s > 315s > ## "Ward77": again more accurate than s+Pade+s, but s+Taylor+s is even more accurate 315s > 315s > ## but on 64-bit AMD Opterons 315s > ## Ward s.P.s s.POs sPs.H08. sPs.H08b s.T.s s.TOs hybrid 315s > ## 4.42e-17 3.99e-17 3.99e-17 1.10e-16 1.10e-16 8.44e-17 8.44e-17 4.42e-17 315s > ## 315s > ## even more astonishing the result on Mac OSX (x86_32_mac; R-forge, R 2.9.0 patch.) 315s > ## Ward s.P.s s.POs sPs.H08. sPs.H08b s.T.s s.TOs hybrid 315s > ## 5.13e-17 3.99e-17 3.99e-17 1.84e-15 1.84e-15 8.44e-17 8.44e-17 5.13e-17 315s > 315s > ## 2014-09: AmHi09 are very good (64bit: 8e-17) for p >= 8 (p=6 has 1.5e-11) 315s > 315s > not.09.06 <- which(names(re.x) != "AmHi09.06") 315s > stopifnot(re.x[c("Ward", "s.T.s8", "s.TOs8")] < 3e-16, 315s + ## re.x[["AmHi09.06"]] < 9e-11, # x64 & 686(lnx): = 1.509e-11 315s + re.x[not.09.06] < 4e-13)# max: 686(32b): 4.52e-14, x64(lnx): 1.103e-16 315s > 315s > ##-- Looking at *sparse* matrices: [C,Fortran "dense" code based methods will fail]: 315s > (meths <- eval(formals(expm)$method)) 315s [1] "Higham08.b" "Higham08" "AlMohy-Hi09" "Ward77" 315s [5] "PadeRBS" "Pade" "Taylor" coercing to dense matrix, as required by method “Higham08.b” 315s "PadeO" 315s [9] "TaylorO" "R_Eigen" "R_Pade" "R_Ward77" 315s [13] "hybrid_Eigen_Ward" 315s > ems <- sapply(meths, function(met) 315s + tryCatch(expm::expm(m., method=met), error=identity)) 315s coercing to dense matrix, as required by method “AlMohy-Hi09” 315s coercing to dense matrix, as required by method “Ward77” 315s coercing to dense matrix, as required by method “PadeRBS” 315s coercing to dense matrix, as required by method “Pade” 315s coercing to dense matrix, as required by method “Taylor” 315s coercing to dense matrix, as required by method “PadeO” 316s coercing to dense matrix, as required by method “TaylorO” 316s > ok <- !sapply(ems, is, class2="error") 316s coercing to dense matrix, as required by method “R_Ward77” 316s coercing to dense matrix, as required by method “hybrid_Eigen_Ward” 316s > meths[ok] # now most... are 316s [1] "Higham08.b" "Higham08" "AlMohy-Hi09" "Ward77" 316s [5] "PadeRBS" "Pade" "Taylor" "PadeO" 316s [9] "TaylorO" "R_Pade" "hybrid_Eigen_Ward" 316s > 316s > showProc.time() 316s Time (user system elapsed): 0.109 0 0.11 316s > 316s > ## Complex Matrices 316s > re.facMat.Z <- function(n, EXPMlist, rFUN = function(n) rnorm(n) + 1i*rnorm(n), ...) 316s + { 316s + stopifnot(is.list(EXPMlist)) 316s + r <- facMat(n, rFUN, ...) 316s + vapply(EXPMlist, function(EXPM) { 316s + ct <- system.time(E <- EXPM(r$A), gcFirst = FALSE)[[1]] 316s + c(relErr = relErr(r$expA, E), c.time = ct) 316s + }, double(2)) 316s + } 316s > 316s > (nmL <- names(expmList)) 316s [1] "Matr" "Matr.d" "Ward" "Ward1b" "RWard6" "RWard7" "RWard8" 316s [8] "RWard9" "s.P.s7" "s.POs7" "s.P.s8" "s.POs8" "s.P.s9" "s.POs9" 316s [15] "s.P.sRBS" "Rs.P.s7" "Rs.P.s8" "Rs.P.s9" "sPs.H08." "sPs.H08b" "AmHi09.07" 316s [22] "AmHi09.08" "AmHi09.09" "AmHi09.10" "AmHi09.11" "AmHi09.12" "AmHi09.13" "s.T.s7" 316s [29] "s.TOs7" "s.T.s8" "s.TOs8" "s.T.s9" "s.TOs9" "Eigen" "hybrid" 316s > ## [1] "Matr" "Matr.d" "Ward" "Ward1b" "s.P.s" "s.POs" "s.P.s7" 316s > ## [8] "s.POs7" "s.P.s9" "s.POs9" "s.P.sRBS" "sPs.H08." "sPs.H08b" "AmHi09.06" 316s > ## [15] "AmHi09.07" "AmHi09.08" "AmHi09.09" "AmHi09.10" "AmHi09.12" "AmHi09.13" "s.T.s" 316s > ## [22] "s.TOs" "s.T.s7" "s.TOs7" "s.T.s9" "s.TOs9" "Eigen" "hybrid" 316s > 316s > ## dropping "Matr", "Matr.d" (which gives "dgeMatrix" currently --> mean(.) fails ... 316s > ## "Ward" "Ward1b" and "hybrid" error "not a numeric Matrix" 316s > ## "AmHi09": C code currently only for double precision ((FIXME)) 316s > (cplxN <- grep("^(Matr|Ward|hybr|AmHi09|s\\.[PT])", nmL, invert = TRUE, value = TRUE)) 316s [1] "RWard6" "RWard7" "RWard8" "RWard9" "Rs.P.s7" "Rs.P.s8" "Rs.P.s9" "sPs.H08." 316s [9] "sPs.H08b" "Eigen" 316s > 316s > rr <- re.facMat.Z(4, expmList[cplxN]) 316s > 316s > set.seed(47) 316s > fREZ <- replicate(if(doExtras) 64 else 12, 316s + re.facMat.Z(15, expmList[cplxN])) 316s > nDig <- -log10(t(fREZ["relErr",,])) 316s > cat("Number of correct decimal digits for facMat(20, rnorm + i*rnorm):\n") 316s Number of correct decimal digits for facMat(20, rnorm + i*rnorm): 316s > t(apply(nDig, 2, summary)) 316s Min. 1st Qu. Median Mean 3rd Qu. Max. 316s RWard6 13.45 13.75 13.86 13.85 13.96 14.17 316s RWard7 13.45 13.74 13.78 13.81 13.89 14.18 316s RWard8 13.56 13.71 13.80 13.81 13.91 14.07 316s RWard9 13.57 13.75 13.88 13.85 13.93 14.21 316s Rs.P.s7 13.57 13.75 13.86 13.86 13.93 14.16 316s Rs.P.s8 13.59 13.78 13.85 13.84 13.92 14.06 316s Rs.P.s9 13.56 13.72 13.76 13.80 13.95 14.00 316s sPs.H08. 14.67 14.82 14.85 14.85 14.89 15.08 316s sPs.H08b 14.67 14.85 14.86 14.87 14.89 15.08 316s Eigen 14.15 14.33 14.38 14.37 14.45 14.51 316s > 316s > ## times (in millisec): 316s > print(1000*t(apply(fREZ["c.time",,], 1, summary))) 316s Min. 1st Qu. Median Mean 3rd Qu. Max. 316s RWard6 0 0 0 0.4167 1.00 1 316s RWard7 0 0 0 0.3333 1.00 1 316s RWard8 0 0 0 0.4167 1.00 1 316s RWard9 0 0 0 0.2500 0.25 1 316s Rs.P.s7 0 0 0 0.4167 1.00 1 316s Rs.P.s8 0 0 0 0.2500 0.25 1 316s Rs.P.s9 0 0 0 0.2500 0.25 1 316s sPs.H08. 0 0 0 0.4167 1.00 1 316s sPs.H08b 0 0 0 0.2500 0.25 1 316s Eigen 0 1 1 0.8333 1.00 1 316s > 316s > ## Now look at that: 316s > op <- par(mar=.1 + c(5,4 + 1.5, 4,2)) 316s > boxplot(t(fREZ["relErr",,]), log="x", xaxt="n", 316s + notch=TRUE, # ylim = c(8e-16, 4e-9), 316s + horizontal=TRUE, las = 1, 316s + main = "relative errors for 'random' eigen-ok 20 x 20 matrix") 316s Warning message: 316s In (function (z, notch = FALSE, width = NULL, varwidth = FALSE, : 316s some notches went outside hinges ('box'): maybe set notch=FALSE 316s > eaxis(1); grid(lty = 3); mtext(myRversion, adj=1, cex=3/4) 316s > par(op) 316s > 316s > 316s > 316s > showProc.time() 316s Time (user system elapsed): 0.097 0.004 0.101 316s > 316s 316s R version 4.4.3 (2025-02-28) -- "Trophy Case" 316s Copyright (C) 2025 The R Foundation for Statistical Computing 316s Platform: arm-unknown-linux-gnueabihf (32-bit) 316s 316s R is free software and comes with ABSOLUTELY NO WARRANTY. 316s You are welcome to redistribute it under certain conditions. 316s Type 'license()' or 'licence()' for distribution details. 316s 316s R is a collaborative project with many contributors. 316s Type 'contributors()' for more information and 316s 'citation()' on how to cite R or R packages in publications. 316s 316s Type 'demo()' for some demos, 'help()' for on-line help, or 316s 'help.start()' for an HTML browser interface to help. 316s Type 'q()' to quit R. 316s 316s > #### Testing the Exponential Condition Number computations 316s > 316s > library(expm) 316s Loading required package: Matrix 317s 317s Attaching package: ‘expm’ 317s 317s > 317s > mSource <- function(file, ...) source(system.file(file, ..., 317s + package = "expm", mustWork=TRUE), 317s + keep.source = FALSE) 317s > mSource("test-tools.R")## -> assertError(), rMat() 317s The following object is masked from ‘package:Matrix’: 317s 317s expm 317s 317s Loading required package: tools 317s > ## getting examples where we know expm(.) "exactly": 317s > mSource("demo", "exact-fn.R") 317s > 317s > M <- xct10$m 317s > eC <- list(expmCondF = 566.582631819923, 317s + expmCond1 = 137.455837652872) 317s > C1 <- expmCond(M, "exact") 317s > (C2 <- expmCond(M, "1.est", expm=FALSE)) 317s [1] 137.4558 317s > (C3. <- expmCond(M, "F.est", abstol = 0.1)[[1]]) 317s [1] 566.5826 317s attr(,"iter") 317s [1] 2 317s > (C3.1 <- expmCond(M, "F.est", abstol = 0.01, reltol = 1e-12)[[1]]) 317s [1] 566.5826 317s attr(,"iter") 317s [1] 3 317s > 317s > stopifnot(all.equal(C1[1:2], eC, tolerance = 1e-14), 317s + all.equal(C2 , eC$expmCond1, tolerance = 1e-14), 317s + all.equal(C3. , eC$expmCondF, tolerance = 1e-14, check.attributes = FALSE), 317s + all.equal(C3.1, eC$expmCondF, tolerance = 1e-14, check.attributes = FALSE)) 317s > 317s > cat('Time elapsed: ', (p1 <- proc.time()),'\n') # for ``statistical reasons'' 317s Time elapsed: 1.242 0.07 1.313 0 0.009 317s > 317s > ## cat('Time elapsed: ',(p2 <- proc.time())-p1,'\n') # for ``statistical reasons'' 317s > 317s > ## cat('Time elapsed: ',(p3 <- proc.time())-p2,'\n') # for ``statistical reasons'' 317s > 317s 317s R version 4.4.3 (2025-02-28) -- "Trophy Case" 317s Copyright (C) 2025 The R Foundation for Statistical Computing 317s Platform: arm-unknown-linux-gnueabihf (32-bit) 317s 317s R is free software and comes with ABSOLUTELY NO WARRANTY. 317s You are welcome to redistribute it under certain conditions. 317s Type 'license()' or 'licence()' for distribution details. 317s 317s R is a collaborative project with many contributors. 317s Type 'contributors()' for more information and 317s 'citation()' on how to cite R or R packages in publications. 317s 317s Type 'demo()' for some demos, 'help()' for on-line help, or 317s 'help.start()' for an HTML browser interface to help. 317s Type 'q()' to quit R. 317s 317s > library(Matrix) 318s > library(expm) 318s 318s Attaching package: ‘expm’ 318s 318s The following object is masked from ‘package:Matrix’: 318s 318s expm 318s 318s > 318s > source(system.file("test-tools.R", package = "expm"), keep.source=FALSE) 318s Loading required package: tools 318s > doExtras 318s [1] FALSE 318s > 318s > tst.sqrtm <- function(m, tol = 1e-12, zap.Im.tol = 1e-10) { 318s + r.m <- sqrtm(m)## should now work 318s + s <- r.m %*% r.m 318s + if(is.complex(s) && all(abs(Im(s)) < mean(abs(s)) * zap.Im.tol)) 318s + s <- Re(s) 318s + all.equal(m, s, tolerance=tol) 318s + } 318s > 318s > 318s > options(verbose = TRUE) # -> get some messages from logm.Higham 318s > 318s > ### ---- Small exact : ---------- 318s > L2 <- cbind(1, 0:1) 318s > lL2 <- cbind(0:1, 0) 318s > (L3 <- rbind(cbind(1,cbind(0:1,0)),1)) 318s [,1] [,2] [,3] 318s [1,] 1 0 0 318s [2,] 1 1 0 318s [3,] 1 1 1 318s > (lL3 <- cbind(rbind(0, cbind((2:1)/2,0:1)), 0)) 318s [,1] [,2] [,3] 318s [1,] 0.0 0 0 318s [2,] 1.0 0 0 318s [3,] 0.5 1 0 318s > 318s > assertError(logm(L2, method="Eigen")) 318s > assertError(logm(L3, method="Eigen")) 318s > 318s > logm.Higham08 <- expm:::logm.Higham08 318s > l.L2 <- logm.Higham08(L2) 318s logm.Higham08() -> (k, m) = (2, 5) 318s > l.L3 <- logm.Higham08(L3) 318s logm.Higham08() -> (k, m) = (4, 3) 318s > 318s > all.equal(l.L2, lL2, tolerance=0)# 5.64 e-14 (32-bit *and* 64-bit) 318s [1] "Mean relative difference: 5.639933e-14" 318s > all.equal(l.L3, lL3, tolerance=0)# 2.40 e-15 (ditto) 318s [1] "Mean relative difference: 2.398082e-15" 318s > stopifnot(all.equal(l.L2, lL2, tolerance= 1000e-16), 318s + all.equal(l.L3, lL3, tolerance= 80e-16)) 318s > showProc.time() 318s Time (user system elapsed): 0.054 0.009 0.063 318s > 318s > ### --------- More & larger randomly generated examples : ----------------- 318s > set.seed(101) 318s logm.Higham08() -> (k, m) = (4, 5) 318s > 318s > EA <- expm.Higham08(A <- matrix(round(rnorm(25),1), 5)) 318s > all.equal(EA, expm.Higham08(logm.Higham08(EA)), tolerance=0) 318s [1] "Mean relative difference: 1.005874e-13" 318s > ## "Mean relative difference: 1.020137e-13" 318s > stopifnot(all.equal(EA, expm.Higham08(logm.Higham08(EA)), tolerance=1e-12)) 318s logm.Higham08() -> (k, m) = (4, 5) 318s > 318s > S <- crossprod(A) 318s > all.equal(S, sqrtm(S) %*% sqrtm(S), tolerance=0) 318s [1] "Mean relative difference: 1.598129e-15" 318s > ## "Mean relative difference: 2.26885e-15" 318s > stopifnot(all.equal(S, sqrtm(S) %*% sqrtm(S), tolerance=1e-14)) 318s > showProc.time() 318s Time (user system elapsed): 0.035 0.003 0.038 318s > 318s > set.seed(3) 318s > 318s > ## n = 50 is already "too" slow (well: logm.Higham08(.) needs 2.2 sec 318s > ## --> CPU measurements below 318s > for(n in c(2:5, 10:11, if(doExtras) 30)) { 318s + cat("n = ",n,": ") 318s + for(kk in seq_len(if(doExtras) 30 else 10)) { 318s + ## Testing logm() 318s + EA <- expm.Higham08(A <- matrix(round(rnorm(n^2),2), n,n)) 318s + stopifnot(all.equal(EA, expm.Higham08(logm.Higham08(EA)), tolerance=1e-12)) 318s + cat(" ") 318s + ## Testing sqrtm() --- for positive definite *and* arbitrary 318s + stopifnot(tst.sqrtm(A))# A is completely random 318s + S <- crossprod(A) + rnorm(n^2) / 1000 318s + stopifnot(tst.sqrtm(S)) 318s + cat(".") 318s + } 318s + cat("\n") 318s + } 318s n = 2 : logm.Higham08() -> (k, m) = (3, 4) 318s .logm.Higham08() -> (k, m) = (4, 4) 318s . logm.Higham08() -> (k, m) = (3, 5) 318s .logm.Higham08() -> (k, m) = (3, 5) 318s .logm.Higham08() -> (k, m) = (4, 3) 318s .logm.Higham08() -> (k, m) = (4, 4) 318s 'x' has negative real eigenvalues; maybe ok for sqrtm() 318s .logm.Higham08() -> (k, m) = (4, 3) 318s .logm.Higham08() -> (k, m) = (4, 4) 318s 'x' has negative real eigenvalues; maybe ok for sqrtm() 318s .logm.Higham08() -> (k, m) = (4, 3) 318s .logm.Higham08() -> (k, m) = (3, 4) 318s . 318s n = 3 : logm.Higham08() -> (k, m) = (5, 3) 318s 'x' has negative real eigenvalues; maybe ok for sqrtm() 318s .logm.Higham08() -> (k, m) = (3, 5) 318s 'x' has negative real eigenvalues; maybe ok for sqrtm() 318s . logm.Higham08() -> (k, m) = (4, 4) 318s 'x' has negative real eigenvalues; maybe ok for sqrtm() 318s .logm.Higham08() -> (k, m) = (5, 4) 318s 'x' has negative real eigenvalues; maybe ok for sqrtm() 318s .logm.Higham08() -> (k, m) = (4, 5) 318s .logm.Higham08() -> (k, m) = (4, 5) 319s . logm.Higham08() -> (k, m) = (5, 4) 319s .logm.Higham08() -> (k, m) = (5, 4) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s .logm.Higham08() -> (k, m) = (4, 5) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s .logm.Higham08() -> (k, m) = (5, 3) 319s . 319s n = 4 : logm.Higham08() -> (k, m) = (5, 3) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s . logm.Higham08() -> (k, m) = (5, 4) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s . logm.Higham08() -> (k, m) = (4, 5) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s .logm.Higham08() -> (k, m) = (5, 4) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s . logm.Higham08() -> (k, m) = (5, 4) 319s .logm.Higham08() -> (k, m) = (4, 5) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s .logm.Higham08() -> (k, m) = (5, 4) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s .logm.Higham08() -> (k, m) = (5, 4) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s . logm.Higham08() -> (k, m) = (4, 4) 319s .logm.Higham08() -> (k, m) = (4, 5) 319s . 319s n = 5 : logm.Higham08() -> (k, m) = (5, 4) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s .logm.Higham08() -> (k, m) = (5, 4) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s .logm.Higham08() -> (k, m) = (5, 3) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s .logm.Higham08() -> (k, m) = (6, 3) 319s .logm.Higham08() -> (k, m) = (6, 3) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s .logm.Higham08() -> (k, m) = (5, 4) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s .logm.Higham08() -> (k, m) = (4, 5) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s . logm.Higham08() -> (k, m) = (5, 4) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s .logm.Higham08() -> (k, m) = (6, 3) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s .logm.Higham08() -> (k, m) = (5, 4) 319s . 319s n = 10 : logm.Higham08() -> (k, m) = (7, 3) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s .logm.Higham08() -> (k, m) = (6, 4) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s .logm.Higham08() -> (k, m) = (6, 4) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s .logm.Higham08() -> (k, m) = (7, 3) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s .logm.Higham08() -> (k, m) = (6, 4) 319s .logm.Higham08() -> (k, m) = (6, 4) 319s .logm.Higham08() -> (k, m) = (7, 3) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s .logm.Higham08() -> (k, m) = (6, 4) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s .logm.Higham08() -> (k, m) = (6, 4) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s .logm.Higham08() -> (k, m) = (7, 3) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s . 319s n = 11 : logm.Higham08() -> (k, m) = (6, 4) 319s .logm.Higham08() -> (k, m) = (6, 5) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s .logm.Higham08() -> (k, m) = (6, 4) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s .logm.Higham08() -> (k, m) = (6, 4) 319s . logm.Higham08() -> (k, m) = (6, 4) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s .logm.Higham08() -> (k, m) = (7, 3) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s .logm.Higham08() -> (k, m) = (7, 3) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s .logm.Higham08() -> (k, m) = (6, 4) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s . logm.Higham08() -> (k, m) = (7, 3) 319s .'x' has negative real eigenvalues; maybe ok for sqrtm() 319s logm.Higham08() -> (k, m) = (7, 3) 319s 'x' has negative real eigenvalues; maybe ok for sqrtm() 319s . 319s > 319s > showProc.time() 319s Time (user system elapsed): 0.776 0.03 0.806 319s > 319s > 319s > ### CPU-measurements for logm() 319s > options(verbose = FALSE)# printing costs .. 319s > set.seed(5) 319s > if(doExtras) { 319s + n <- 50 319s + sim <- 32 319s + } else { 319s + n <- 21 319s + sim <- 8 319s + } 319s > 319s > cpuT <- numeric(sim) 319s > for(k in seq_len(sim)) { 319s + EA <- expm.Higham08(A <- matrix(rnorm(n^2), n,n)) 319s + cat(".") 319s + cpuT[k] <- system.time(LEA <- logm.Higham08(EA))[1] 319s + stopifnot(all.equal(EA, expm.Higham08(LEA), tolerance=1e-12)) 319s + }; cat("\n") 320s ........ 320s > summary(cpuT) 320s Min. 1st Qu. Median Mean 3rd Qu. Max. 320s 0.03600 0.03700 0.03750 0.03950 0.04075 0.04800 320s > ## cmath-5 {Feb.2009}; Michi's original code: 320s > ## Min. 1st Qu. Median Mean 3rd Qu. Max. 320s > ## 1.794 2.249 2.389 2.388 2.515 2.831 320s > 320s > showProc.time() 320s Time (user system elapsed): 1.097 0.003 1.101 320s > 320s > 320s 320s R version 4.4.3 (2025-02-28) -- "Trophy Case" 320s Copyright (C) 2025 The R Foundation for Statistical Computing 320s Platform: arm-unknown-linux-gnueabihf (32-bit) 320s 320s R is free software and comes with ABSOLUTELY NO WARRANTY. 320s You are welcome to redistribute it under certain conditions. 320s Type 'license()' or 'licence()' for distribution details. 320s 320s R is a collaborative project with many contributors. 320s Type 'contributors()' for more information and 320s 'citation()' on how to cite R or R packages in publications. 320s 320s Type 'demo()' for some demos, 'help()' for on-line help, or 320s 'help.start()' for an HTML browser interface to help. 320s Type 'q()' to quit R. 320s 321s > library(expm) 321s Loading required package: Matrix 322s 322s Attaching package: ‘expm’ 322s 322s The following object is masked from ‘package:Matrix’: 322s 322s expm 322s 322s > 322s > source(system.file("test-tools.R", package= "expm"), keep.source=FALSE) 322s Loading required package: tools 322s > ## -> assertError()... doExtras 322s > doExtras 322s [1] FALSE 322s > 322s > ## Missing REPROTECT(), till 2014-09-03 [because 'A' is *integer*]: 322s > set.seed(17) 322s > n <- 300 322s > A <- matrix(rbinom(n^2, size=1, prob=0.1), n,n) 322s > stopifnot(is.integer(A)) 322s > A2 <- A %^% 2 322s > for(i in 1:100) { 322s + A. <- A %^% 2 322s + if(!isTRUE(all.equal(A2, A.))) 322s + cat("not equal; i=",i,"\n") 322s + } 326s > ## MM: On nb-mm3, I get a different error which shows memory corruption: 326s > ## REAL() can only be applied to a 'numeric', not a 'character' 326s > ## or REAL() can only be applied to a 'numeric', not a 'NULL' 326s > 326s > ## Check that *large* matrices now work 326s > if(FALSE) ## << even m %^% 2 takes > 20 hours (!!!) [but no longer stops early!] 326s + if(doExtras && require("sfsmisc") && 326s + exists("Sys.memGB", "package:sfsmisc", mode="function") && 326s + sfsmisc::Sys.memGB() > 50) { ## seems to need 3 x size(m) 326s + ## 326s + n <- 46341 326s + print(as.integer(n^2))# integer overflow 326s + cat("Creating large matrix 'm' (more than max_int entries):\n ") 326s + print(system.time(m <- diag(x = (1:n)^3, nrow = n))) # 9.1 sec 326s + i <- 1:(n-1) 326s + print(system.time( m[cbind(i,i+1)] <- i )) # 11.3 sec 326s + cat("object.size(m): "); print(object.size(m), units="Gb") 326s + ## 16 Gb (= 17.78 e9 bytes) 326s + ## This __STILL__ takes hours 326s + cat("m %^% 2: "); print(system.time(m2 <- m %^% 2)) 326s + ## user system elapsed 326s + ## 127199.580 9608.373 137236.405 ==> 326s + 326s + cat("m %^% 4: "); print(system.time(m4 <- m %^% 4)) # 326s + } 326s > 326s > 326s autopkgtest [16:11:39]: test run-unit-test: -----------------------] 330s autopkgtest [16:11:43]: test run-unit-test: - - - - - - - - - - results - - - - - - - - - - 330s run-unit-test PASS 334s autopkgtest [16:11:47]: test pkg-r-autopkgtest: preparing testbed 356s autopkgtest [16:12:09]: testbed dpkg architecture: armhf 358s autopkgtest [16:12:11]: testbed apt version: 2.9.33 361s autopkgtest [16:12:14]: @@@@@@@@@@@@@@@@@@@@ test bed setup 363s autopkgtest [16:12:16]: testbed release detected to be: plucky 370s autopkgtest [16:12:23]: updating testbed package index (apt update) 372s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [126 kB] 373s Get:2 http://ftpmaster.internal/ubuntu plucky InRelease [257 kB] 373s Get:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease [126 kB] 374s Get:4 http://ftpmaster.internal/ubuntu plucky-security InRelease [126 kB] 374s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [379 kB] 375s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [99.7 kB] 375s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [15.8 kB] 375s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/main armhf Packages [114 kB] 375s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/main armhf c-n-f Metadata [1832 B] 375s Get:10 http://ftpmaster.internal/ubuntu plucky-proposed/restricted armhf c-n-f Metadata [116 B] 375s Get:11 http://ftpmaster.internal/ubuntu plucky-proposed/universe armhf Packages [312 kB] 376s Get:12 http://ftpmaster.internal/ubuntu plucky-proposed/universe armhf c-n-f Metadata [11.1 kB] 376s Get:13 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse armhf Packages [3472 B] 376s Get:14 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse armhf c-n-f Metadata [240 B] 376s Get:15 http://ftpmaster.internal/ubuntu plucky/main Sources [1394 kB] 378s Get:16 http://ftpmaster.internal/ubuntu plucky/universe Sources [21.0 MB] 412s Get:17 http://ftpmaster.internal/ubuntu plucky/multiverse Sources [299 kB] 412s Get:18 http://ftpmaster.internal/ubuntu plucky/main armhf Packages [1378 kB] 414s Get:19 http://ftpmaster.internal/ubuntu plucky/main armhf c-n-f Metadata [29.4 kB] 414s Get:20 http://ftpmaster.internal/ubuntu plucky/restricted armhf c-n-f Metadata [108 B] 414s Get:21 http://ftpmaster.internal/ubuntu plucky/universe armhf Packages [15.1 MB] 436s Get:22 http://ftpmaster.internal/ubuntu plucky/multiverse armhf Packages [172 kB] 438s Fetched 41.0 MB in 1min 6s (625 kB/s) 440s Reading package lists... 446s autopkgtest [16:13:39]: upgrading testbed (apt dist-upgrade and autopurge) 448s Reading package lists... 449s Building dependency tree... 449s Reading state information... 450s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 451s Starting 2 pkgProblemResolver with broken count: 0 451s Done 453s Entering ResolveByKeep 453s 454s Calculating upgrade... 455s The following packages will be upgraded: 455s libc-bin libc6 locales pinentry-curses python3-jinja2 sos strace 456s 7 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 456s Need to get 8683 kB of archives. 456s After this operation, 23.6 kB of additional disk space will be used. 456s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed/main armhf libc6 armhf 2.41-1ubuntu2 [2932 kB] 459s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/main armhf libc-bin armhf 2.41-1ubuntu2 [545 kB] 460s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/main armhf locales all 2.41-1ubuntu2 [4246 kB] 464s Get:4 http://ftpmaster.internal/ubuntu plucky/main armhf strace armhf 6.13+ds-1ubuntu1 [445 kB] 465s Get:5 http://ftpmaster.internal/ubuntu plucky/main armhf pinentry-curses armhf 1.3.1-2ubuntu3 [40.6 kB] 465s Get:6 http://ftpmaster.internal/ubuntu plucky/main armhf python3-jinja2 all 3.1.5-2ubuntu1 [109 kB] 465s Get:7 http://ftpmaster.internal/ubuntu plucky/main armhf sos all 4.9.0-5 [365 kB] 466s Preconfiguring packages ... 466s Fetched 8683 kB in 10s (887 kB/s) 466s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 64655 files and directories currently installed.) 466s Preparing to unpack .../libc6_2.41-1ubuntu2_armhf.deb ... 466s Unpacking libc6:armhf (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 467s Setting up libc6:armhf (2.41-1ubuntu2) ... 467s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 64655 files and directories currently installed.) 467s Preparing to unpack .../libc-bin_2.41-1ubuntu2_armhf.deb ... 467s Unpacking libc-bin (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 467s Setting up libc-bin (2.41-1ubuntu2) ... 468s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 64655 files and directories currently installed.) 468s Preparing to unpack .../locales_2.41-1ubuntu2_all.deb ... 468s Unpacking locales (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 468s Preparing to unpack .../strace_6.13+ds-1ubuntu1_armhf.deb ... 468s Unpacking strace (6.13+ds-1ubuntu1) over (6.11-0ubuntu1) ... 468s Preparing to unpack .../pinentry-curses_1.3.1-2ubuntu3_armhf.deb ... 468s Unpacking pinentry-curses (1.3.1-2ubuntu3) over (1.3.1-2ubuntu2) ... 468s Preparing to unpack .../python3-jinja2_3.1.5-2ubuntu1_all.deb ... 468s Unpacking python3-jinja2 (3.1.5-2ubuntu1) over (3.1.5-2) ... 468s Preparing to unpack .../archives/sos_4.9.0-5_all.deb ... 469s Unpacking sos (4.9.0-5) over (4.9.0-4) ... 469s Setting up sos (4.9.0-5) ... 469s Setting up pinentry-curses (1.3.1-2ubuntu3) ... 469s Setting up locales (2.41-1ubuntu2) ... 471s Generating locales (this might take a while)... 473s en_US.UTF-8... done 473s Generation complete. 473s Setting up python3-jinja2 (3.1.5-2ubuntu1) ... 473s Setting up strace (6.13+ds-1ubuntu1) ... 473s Processing triggers for man-db (2.13.0-1) ... 474s Processing triggers for systemd (257.3-1ubuntu3) ... 477s Reading package lists... 477s Building dependency tree... 477s Reading state information... 477s Starting pkgProblemResolver with broken count: 0 478s Starting 2 pkgProblemResolver with broken count: 0 478s Done 478s Solving dependencies... 479s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 481s autopkgtest [16:14:14]: rebooting testbed after setup commands that affected boot 545s Reading package lists... 545s Building dependency tree... 545s Reading state information... 546s Starting pkgProblemResolver with broken count: 0 546s Starting 2 pkgProblemResolver with broken count: 0 546s Done 547s The following NEW packages will be installed: 547s build-essential cpp cpp-14 cpp-14-arm-linux-gnueabihf 547s cpp-arm-linux-gnueabihf dctrl-tools fontconfig fontconfig-config 547s fonts-dejavu-core fonts-dejavu-mono g++ g++-14 g++-14-arm-linux-gnueabihf 547s g++-arm-linux-gnueabihf gcc gcc-14 gcc-14-arm-linux-gnueabihf 547s gcc-arm-linux-gnueabihf gfortran gfortran-14 gfortran-14-arm-linux-gnueabihf 547s gfortran-arm-linux-gnueabihf icu-devtools libasan8 libblas-dev libblas3 547s libbz2-dev libc-dev-bin libc6-dev libcairo2 libcc1-0 libcrypt-dev libdatrie1 547s libdeflate-dev libdeflate0 libfontconfig1 libfreetype6 libgcc-14-dev 547s libgfortran-14-dev libgfortran5 libgomp1 libgraphite2-3 libharfbuzz0b 547s libice6 libicu-dev libisl23 libjbig0 libjpeg-dev libjpeg-turbo8 547s libjpeg-turbo8-dev libjpeg8 libjpeg8-dev liblapack-dev liblapack3 liblerc4 547s liblzma-dev libmpc3 libncurses-dev libpango-1.0-0 libpangocairo-1.0-0 547s libpangoft2-1.0-0 libpaper-utils libpaper2 libpcre2-16-0 libpcre2-32-0 547s libpcre2-dev libpcre2-posix3 libpixman-1-0 libpkgconf3 libpng-dev 547s libreadline-dev libsharpyuv0 libsm6 libstdc++-14-dev libtcl8.6 libthai-data 547s libthai0 libtiff6 libtirpc-dev libtk8.6 libubsan1 libwebp7 libxcb-render0 547s libxcb-shm0 libxft2 libxrender1 libxss1 libxt6t64 linux-libc-dev 547s pkg-r-autopkgtest pkgconf pkgconf-bin r-base-core r-base-dev r-cran-expm 547s r-cran-lattice r-cran-matrix r-cran-rcolorbrewer r-cran-sfsmisc rpcsvc-proto 547s unzip x11-common xdg-utils zip zlib1g-dev 547s 0 upgraded, 105 newly installed, 0 to remove and 0 not upgraded. 547s Need to get 122 MB of archives. 547s After this operation, 323 MB of additional disk space will be used. 547s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed/main armhf libc-dev-bin armhf 2.41-1ubuntu2 [23.0 kB] 547s Get:2 http://ftpmaster.internal/ubuntu plucky/main armhf linux-libc-dev armhf 6.14.0-10.10 [1683 kB] 549s Get:3 http://ftpmaster.internal/ubuntu plucky/main armhf libcrypt-dev armhf 1:4.4.38-1 [120 kB] 549s Get:4 http://ftpmaster.internal/ubuntu plucky/main armhf rpcsvc-proto armhf 1.4.2-0ubuntu7 [62.2 kB] 549s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/main armhf libc6-dev armhf 2.41-1ubuntu2 [1396 kB] 551s Get:6 http://ftpmaster.internal/ubuntu plucky/main armhf libisl23 armhf 0.27-1 [546 kB] 552s Get:7 http://ftpmaster.internal/ubuntu plucky/main armhf libmpc3 armhf 1.3.1-1build2 [47.1 kB] 552s Get:8 http://ftpmaster.internal/ubuntu plucky/main armhf cpp-14-arm-linux-gnueabihf armhf 14.2.0-17ubuntu3 [9220 kB] 563s Get:9 http://ftpmaster.internal/ubuntu plucky/main armhf cpp-14 armhf 14.2.0-17ubuntu3 [1030 B] 563s Get:10 http://ftpmaster.internal/ubuntu plucky/main armhf cpp-arm-linux-gnueabihf armhf 4:14.2.0-1ubuntu1 [5578 B] 563s Get:11 http://ftpmaster.internal/ubuntu plucky/main armhf cpp armhf 4:14.2.0-1ubuntu1 [22.4 kB] 563s Get:12 http://ftpmaster.internal/ubuntu plucky/main armhf libcc1-0 armhf 15-20250222-0ubuntu1 [38.9 kB] 563s Get:13 http://ftpmaster.internal/ubuntu plucky/main armhf libgomp1 armhf 15-20250222-0ubuntu1 [128 kB] 563s Get:14 http://ftpmaster.internal/ubuntu plucky/main armhf libasan8 armhf 15-20250222-0ubuntu1 [2955 kB] 566s Get:15 http://ftpmaster.internal/ubuntu plucky/main armhf libubsan1 armhf 15-20250222-0ubuntu1 [1191 kB] 567s Get:16 http://ftpmaster.internal/ubuntu plucky/main armhf libgcc-14-dev armhf 14.2.0-17ubuntu3 [897 kB] 569s Get:17 http://ftpmaster.internal/ubuntu plucky/main armhf gcc-14-arm-linux-gnueabihf armhf 14.2.0-17ubuntu3 [18.0 MB] 589s Get:18 http://ftpmaster.internal/ubuntu plucky/main armhf gcc-14 armhf 14.2.0-17ubuntu3 [506 kB] 590s Get:19 http://ftpmaster.internal/ubuntu plucky/main armhf gcc-arm-linux-gnueabihf armhf 4:14.2.0-1ubuntu1 [1218 B] 590s Get:20 http://ftpmaster.internal/ubuntu plucky/main armhf gcc armhf 4:14.2.0-1ubuntu1 [5004 B] 590s Get:21 http://ftpmaster.internal/ubuntu plucky/main armhf libstdc++-14-dev armhf 14.2.0-17ubuntu3 [2573 kB] 593s Get:22 http://ftpmaster.internal/ubuntu plucky/main armhf g++-14-arm-linux-gnueabihf armhf 14.2.0-17ubuntu3 [10.5 MB] 603s Get:23 http://ftpmaster.internal/ubuntu plucky/main armhf g++-14 armhf 14.2.0-17ubuntu3 [21.8 kB] 603s Get:24 http://ftpmaster.internal/ubuntu plucky/main armhf g++-arm-linux-gnueabihf armhf 4:14.2.0-1ubuntu1 [966 B] 603s Get:25 http://ftpmaster.internal/ubuntu plucky/main armhf g++ armhf 4:14.2.0-1ubuntu1 [1084 B] 603s Get:26 http://ftpmaster.internal/ubuntu plucky/main armhf build-essential armhf 12.10ubuntu1 [4928 B] 603s Get:27 http://ftpmaster.internal/ubuntu plucky/main armhf dctrl-tools armhf 2.24-3build3 [94.7 kB] 603s Get:28 http://ftpmaster.internal/ubuntu plucky/main armhf libfreetype6 armhf 2.13.3+dfsg-1 [330 kB] 604s Get:29 http://ftpmaster.internal/ubuntu plucky/main armhf fonts-dejavu-mono all 2.37-8 [502 kB] 604s Get:30 http://ftpmaster.internal/ubuntu plucky/main armhf fonts-dejavu-core all 2.37-8 [835 kB] 605s Get:31 http://ftpmaster.internal/ubuntu plucky/main armhf fontconfig-config armhf 2.15.0-2ubuntu1 [37.5 kB] 605s Get:32 http://ftpmaster.internal/ubuntu plucky/main armhf libfontconfig1 armhf 2.15.0-2ubuntu1 [114 kB] 605s Get:33 http://ftpmaster.internal/ubuntu plucky/main armhf fontconfig armhf 2.15.0-2ubuntu1 [190 kB] 605s Get:34 http://ftpmaster.internal/ubuntu plucky/main armhf libgfortran5 armhf 15-20250222-0ubuntu1 [330 kB] 606s Get:35 http://ftpmaster.internal/ubuntu plucky/main armhf libgfortran-14-dev armhf 14.2.0-17ubuntu3 [370 kB] 606s Get:36 http://ftpmaster.internal/ubuntu plucky/main armhf gfortran-14-arm-linux-gnueabihf armhf 14.2.0-17ubuntu3 [9763 kB] 616s Get:37 http://ftpmaster.internal/ubuntu plucky/main armhf gfortran-14 armhf 14.2.0-17ubuntu3 [13.6 kB] 616s Get:38 http://ftpmaster.internal/ubuntu plucky/main armhf gfortran-arm-linux-gnueabihf armhf 4:14.2.0-1ubuntu1 [1026 B] 616s Get:39 http://ftpmaster.internal/ubuntu plucky/main armhf gfortran armhf 4:14.2.0-1ubuntu1 [1166 B] 616s Get:40 http://ftpmaster.internal/ubuntu plucky/main armhf icu-devtools armhf 76.1-1ubuntu2 [206 kB] 617s Get:41 http://ftpmaster.internal/ubuntu plucky/main armhf libblas3 armhf 3.12.1-2 [132 kB] 617s Get:42 http://ftpmaster.internal/ubuntu plucky/main armhf libblas-dev armhf 3.12.1-2 [141 kB] 617s Get:43 http://ftpmaster.internal/ubuntu plucky/main armhf libbz2-dev armhf 1.0.8-6 [30.9 kB] 617s Get:44 http://ftpmaster.internal/ubuntu plucky/main armhf libpixman-1-0 armhf 0.44.0-3 [183 kB] 617s Get:45 http://ftpmaster.internal/ubuntu plucky/main armhf libxcb-render0 armhf 1.17.0-2 [15.3 kB] 617s Get:46 http://ftpmaster.internal/ubuntu plucky/main armhf libxcb-shm0 armhf 1.17.0-2 [5774 B] 617s Get:47 http://ftpmaster.internal/ubuntu plucky/main armhf libxrender1 armhf 1:0.9.10-1.1build1 [16.0 kB] 617s Get:48 http://ftpmaster.internal/ubuntu plucky/main armhf libcairo2 armhf 1.18.2-2 [484 kB] 618s Get:49 http://ftpmaster.internal/ubuntu plucky/main armhf libdatrie1 armhf 0.2.13-3build1 [15.7 kB] 618s Get:50 http://ftpmaster.internal/ubuntu plucky/main armhf libdeflate0 armhf 1.23-1 [38.5 kB] 618s Get:51 http://ftpmaster.internal/ubuntu plucky/main armhf libdeflate-dev armhf 1.23-1 [45.0 kB] 618s Get:52 http://ftpmaster.internal/ubuntu plucky/main armhf libgraphite2-3 armhf 1.3.14-2ubuntu1 [64.8 kB] 618s Get:53 http://ftpmaster.internal/ubuntu plucky/main armhf libharfbuzz0b armhf 10.2.0-1 [464 kB] 618s Get:54 http://ftpmaster.internal/ubuntu plucky/main armhf x11-common all 1:7.7+23ubuntu3 [21.7 kB] 618s Get:55 http://ftpmaster.internal/ubuntu plucky/main armhf libice6 armhf 2:1.1.1-1 [36.5 kB] 618s Get:56 http://ftpmaster.internal/ubuntu plucky/main armhf libicu-dev armhf 76.1-1ubuntu2 [12.0 MB] 631s Get:57 http://ftpmaster.internal/ubuntu plucky/main armhf libjpeg-turbo8 armhf 2.1.5-3ubuntu2 [127 kB] 631s Get:58 http://ftpmaster.internal/ubuntu plucky/main armhf libjpeg-turbo8-dev armhf 2.1.5-3ubuntu2 [265 kB] 631s Get:59 http://ftpmaster.internal/ubuntu plucky/main armhf libjpeg8 armhf 8c-2ubuntu11 [2148 B] 631s Get:60 http://ftpmaster.internal/ubuntu plucky/main armhf libjpeg8-dev armhf 8c-2ubuntu11 [1484 B] 631s Get:61 http://ftpmaster.internal/ubuntu plucky/main armhf libjpeg-dev armhf 8c-2ubuntu11 [1482 B] 631s Get:62 http://ftpmaster.internal/ubuntu plucky/main armhf liblapack3 armhf 3.12.1-2 [2091 kB] 633s Get:63 http://ftpmaster.internal/ubuntu plucky/main armhf liblapack-dev armhf 3.12.1-2 [2207 kB] 636s Get:64 http://ftpmaster.internal/ubuntu plucky/main armhf liblerc4 armhf 4.0.0+ds-5ubuntu1 [160 kB] 636s Get:65 http://ftpmaster.internal/ubuntu plucky/main armhf libncurses-dev armhf 6.5+20250216-2 [345 kB] 636s Get:66 http://ftpmaster.internal/ubuntu plucky/main armhf libthai-data all 0.1.29-2build1 [158 kB] 636s Get:67 http://ftpmaster.internal/ubuntu plucky/main armhf libthai0 armhf 0.1.29-2build1 [15.2 kB] 636s Get:68 http://ftpmaster.internal/ubuntu plucky/main armhf libpango-1.0-0 armhf 1.56.2-1 [216 kB] 636s Get:69 http://ftpmaster.internal/ubuntu plucky/main armhf libpangoft2-1.0-0 armhf 1.56.2-1 [43.6 kB] 636s Get:70 http://ftpmaster.internal/ubuntu plucky/main armhf libpangocairo-1.0-0 armhf 1.56.2-1 [25.1 kB] 636s Get:71 http://ftpmaster.internal/ubuntu plucky/main armhf libpaper2 armhf 2.2.5-0.3 [16.3 kB] 637s Get:72 http://ftpmaster.internal/ubuntu plucky/main armhf libpaper-utils armhf 2.2.5-0.3 [14.2 kB] 637s Get:73 http://ftpmaster.internal/ubuntu plucky/main armhf libpcre2-16-0 armhf 10.45-1 [207 kB] 637s Get:74 http://ftpmaster.internal/ubuntu plucky/main armhf libpcre2-32-0 armhf 10.45-1 [197 kB] 637s Get:75 http://ftpmaster.internal/ubuntu plucky/main armhf libpcre2-posix3 armhf 10.45-1 [6300 B] 637s Get:76 http://ftpmaster.internal/ubuntu plucky/main armhf libpcre2-dev armhf 10.45-1 [752 kB] 638s Get:77 http://ftpmaster.internal/ubuntu plucky/main armhf libpkgconf3 armhf 1.8.1-4 [26.6 kB] 638s Get:78 http://ftpmaster.internal/ubuntu plucky/main armhf zlib1g-dev armhf 1:1.3.dfsg+really1.3.1-1ubuntu1 [880 kB] 639s Get:79 http://ftpmaster.internal/ubuntu plucky/main armhf libpng-dev armhf 1.6.47-1 [251 kB] 639s Get:80 http://ftpmaster.internal/ubuntu plucky/main armhf libreadline-dev armhf 8.2-6 [153 kB] 639s Get:81 http://ftpmaster.internal/ubuntu plucky/main armhf libsharpyuv0 armhf 1.5.0-0.1 [16.4 kB] 639s Get:82 http://ftpmaster.internal/ubuntu plucky/main armhf libsm6 armhf 2:1.2.4-1 [15.1 kB] 639s Get:83 http://ftpmaster.internal/ubuntu plucky/main armhf libtcl8.6 armhf 8.6.16+dfsg-1 [909 kB] 640s Get:84 http://ftpmaster.internal/ubuntu plucky/main armhf libjbig0 armhf 2.1-6.1ubuntu2 [24.9 kB] 640s Get:85 http://ftpmaster.internal/ubuntu plucky/main armhf libwebp7 armhf 1.5.0-0.1 [188 kB] 640s Get:86 http://ftpmaster.internal/ubuntu plucky/main armhf libtiff6 armhf 4.5.1+git230720-4ubuntu4 [179 kB] 641s Get:87 http://ftpmaster.internal/ubuntu plucky/main armhf libxft2 armhf 2.3.6-1build1 [37.4 kB] 641s Get:88 http://ftpmaster.internal/ubuntu plucky/main armhf libxss1 armhf 1:1.2.3-1build3 [6500 B] 641s Get:89 http://ftpmaster.internal/ubuntu plucky/main armhf libtk8.6 armhf 8.6.16-1 [686 kB] 641s Get:90 http://ftpmaster.internal/ubuntu plucky/main armhf libxt6t64 armhf 1:1.2.1-1.2build1 [145 kB] 642s Get:91 http://ftpmaster.internal/ubuntu plucky/main armhf zip armhf 3.0-14ubuntu2 [164 kB] 642s Get:92 http://ftpmaster.internal/ubuntu plucky/main armhf unzip armhf 6.0-28ubuntu6 [167 kB] 642s Get:93 http://ftpmaster.internal/ubuntu plucky/main armhf xdg-utils all 1.2.1-2ubuntu1 [66.0 kB] 642s Get:94 http://ftpmaster.internal/ubuntu plucky/universe armhf r-base-core armhf 4.4.3-1 [28.2 MB] 670s Get:95 http://ftpmaster.internal/ubuntu plucky/main armhf liblzma-dev armhf 5.6.4-1 [166 kB] 670s Get:96 http://ftpmaster.internal/ubuntu plucky/main armhf pkgconf-bin armhf 1.8.1-4 [21.2 kB] 670s Get:97 http://ftpmaster.internal/ubuntu plucky/main armhf pkgconf armhf 1.8.1-4 [16.8 kB] 670s Get:98 http://ftpmaster.internal/ubuntu plucky/main armhf libtirpc-dev armhf 1.3.4+ds-1.3 [184 kB] 671s Get:99 http://ftpmaster.internal/ubuntu plucky/universe armhf r-base-dev all 4.4.3-1 [4176 B] 671s Get:100 http://ftpmaster.internal/ubuntu plucky/universe armhf pkg-r-autopkgtest all 20231212ubuntu1 [6448 B] 671s Get:101 http://ftpmaster.internal/ubuntu plucky/universe armhf r-cran-lattice armhf 0.22-6-1 [1363 kB] 672s Get:102 http://ftpmaster.internal/ubuntu plucky/universe armhf r-cran-matrix armhf 1.7-3-1 [4039 kB] 676s Get:103 http://ftpmaster.internal/ubuntu plucky/universe armhf r-cran-expm armhf 1.0-0-1 [223 kB] 676s Get:104 http://ftpmaster.internal/ubuntu plucky/universe armhf r-cran-rcolorbrewer all 1.1-3-1build1 [55.4 kB] 676s Get:105 http://ftpmaster.internal/ubuntu plucky/universe armhf r-cran-sfsmisc all 1.1-20-1 [674 kB] 678s Preconfiguring packages ... 678s Fetched 122 MB in 2min 10s (937 kB/s) 678s Selecting previously unselected package libc-dev-bin. 678s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 64655 files and directories currently installed.) 678s Preparing to unpack .../000-libc-dev-bin_2.41-1ubuntu2_armhf.deb ... 678s Unpacking libc-dev-bin (2.41-1ubuntu2) ... 678s Selecting previously unselected package linux-libc-dev:armhf. 678s Preparing to unpack .../001-linux-libc-dev_6.14.0-10.10_armhf.deb ... 678s Unpacking linux-libc-dev:armhf (6.14.0-10.10) ... 679s Selecting previously unselected package libcrypt-dev:armhf. 679s Preparing to unpack .../002-libcrypt-dev_1%3a4.4.38-1_armhf.deb ... 679s Unpacking libcrypt-dev:armhf (1:4.4.38-1) ... 679s Selecting previously unselected package rpcsvc-proto. 679s Preparing to unpack .../003-rpcsvc-proto_1.4.2-0ubuntu7_armhf.deb ... 679s Unpacking rpcsvc-proto (1.4.2-0ubuntu7) ... 679s Selecting previously unselected package libc6-dev:armhf. 679s Preparing to unpack .../004-libc6-dev_2.41-1ubuntu2_armhf.deb ... 679s Unpacking libc6-dev:armhf (2.41-1ubuntu2) ... 679s Selecting previously unselected package libisl23:armhf. 679s Preparing to unpack .../005-libisl23_0.27-1_armhf.deb ... 679s Unpacking libisl23:armhf (0.27-1) ... 679s Selecting previously unselected package libmpc3:armhf. 679s Preparing to unpack .../006-libmpc3_1.3.1-1build2_armhf.deb ... 679s Unpacking libmpc3:armhf (1.3.1-1build2) ... 679s Selecting previously unselected package cpp-14-arm-linux-gnueabihf. 679s Preparing to unpack .../007-cpp-14-arm-linux-gnueabihf_14.2.0-17ubuntu3_armhf.deb ... 679s Unpacking cpp-14-arm-linux-gnueabihf (14.2.0-17ubuntu3) ... 679s Selecting previously unselected package cpp-14. 679s Preparing to unpack .../008-cpp-14_14.2.0-17ubuntu3_armhf.deb ... 679s Unpacking cpp-14 (14.2.0-17ubuntu3) ... 680s Selecting previously unselected package cpp-arm-linux-gnueabihf. 680s Preparing to unpack .../009-cpp-arm-linux-gnueabihf_4%3a14.2.0-1ubuntu1_armhf.deb ... 680s Unpacking cpp-arm-linux-gnueabihf (4:14.2.0-1ubuntu1) ... 680s Selecting previously unselected package cpp. 680s Preparing to unpack .../010-cpp_4%3a14.2.0-1ubuntu1_armhf.deb ... 680s Unpacking cpp (4:14.2.0-1ubuntu1) ... 680s Selecting previously unselected package libcc1-0:armhf. 680s Preparing to unpack .../011-libcc1-0_15-20250222-0ubuntu1_armhf.deb ... 680s Unpacking libcc1-0:armhf (15-20250222-0ubuntu1) ... 680s Selecting previously unselected package libgomp1:armhf. 680s Preparing to unpack .../012-libgomp1_15-20250222-0ubuntu1_armhf.deb ... 680s Unpacking libgomp1:armhf (15-20250222-0ubuntu1) ... 680s Selecting previously unselected package libasan8:armhf. 680s Preparing to unpack .../013-libasan8_15-20250222-0ubuntu1_armhf.deb ... 680s Unpacking libasan8:armhf (15-20250222-0ubuntu1) ... 680s Selecting previously unselected package libubsan1:armhf. 680s Preparing to unpack .../014-libubsan1_15-20250222-0ubuntu1_armhf.deb ... 680s Unpacking libubsan1:armhf (15-20250222-0ubuntu1) ... 680s Selecting previously unselected package libgcc-14-dev:armhf. 680s Preparing to unpack .../015-libgcc-14-dev_14.2.0-17ubuntu3_armhf.deb ... 680s Unpacking libgcc-14-dev:armhf (14.2.0-17ubuntu3) ... 680s Selecting previously unselected package gcc-14-arm-linux-gnueabihf. 680s Preparing to unpack .../016-gcc-14-arm-linux-gnueabihf_14.2.0-17ubuntu3_armhf.deb ... 680s Unpacking gcc-14-arm-linux-gnueabihf (14.2.0-17ubuntu3) ... 681s Selecting previously unselected package gcc-14. 681s Preparing to unpack .../017-gcc-14_14.2.0-17ubuntu3_armhf.deb ... 681s Unpacking gcc-14 (14.2.0-17ubuntu3) ... 681s Selecting previously unselected package gcc-arm-linux-gnueabihf. 681s Preparing to unpack .../018-gcc-arm-linux-gnueabihf_4%3a14.2.0-1ubuntu1_armhf.deb ... 681s Unpacking gcc-arm-linux-gnueabihf (4:14.2.0-1ubuntu1) ... 681s Selecting previously unselected package gcc. 681s Preparing to unpack .../019-gcc_4%3a14.2.0-1ubuntu1_armhf.deb ... 681s Unpacking gcc (4:14.2.0-1ubuntu1) ... 681s Selecting previously unselected package libstdc++-14-dev:armhf. 681s Preparing to unpack .../020-libstdc++-14-dev_14.2.0-17ubuntu3_armhf.deb ... 681s Unpacking libstdc++-14-dev:armhf (14.2.0-17ubuntu3) ... 681s Selecting previously unselected package g++-14-arm-linux-gnueabihf. 681s Preparing to unpack .../021-g++-14-arm-linux-gnueabihf_14.2.0-17ubuntu3_armhf.deb ... 681s Unpacking g++-14-arm-linux-gnueabihf (14.2.0-17ubuntu3) ... 682s Selecting previously unselected package g++-14. 682s Preparing to unpack .../022-g++-14_14.2.0-17ubuntu3_armhf.deb ... 682s Unpacking g++-14 (14.2.0-17ubuntu3) ... 682s Selecting previously unselected package g++-arm-linux-gnueabihf. 682s Preparing to unpack .../023-g++-arm-linux-gnueabihf_4%3a14.2.0-1ubuntu1_armhf.deb ... 682s Unpacking g++-arm-linux-gnueabihf (4:14.2.0-1ubuntu1) ... 682s Selecting previously unselected package g++. 682s Preparing to unpack .../024-g++_4%3a14.2.0-1ubuntu1_armhf.deb ... 682s Unpacking g++ (4:14.2.0-1ubuntu1) ... 682s Selecting previously unselected package build-essential. 682s Preparing to unpack .../025-build-essential_12.10ubuntu1_armhf.deb ... 682s Unpacking build-essential (12.10ubuntu1) ... 682s Selecting previously unselected package dctrl-tools. 682s Preparing to unpack .../026-dctrl-tools_2.24-3build3_armhf.deb ... 682s Unpacking dctrl-tools (2.24-3build3) ... 682s Selecting previously unselected package libfreetype6:armhf. 682s Preparing to unpack .../027-libfreetype6_2.13.3+dfsg-1_armhf.deb ... 682s Unpacking libfreetype6:armhf (2.13.3+dfsg-1) ... 682s Selecting previously unselected package fonts-dejavu-mono. 682s Preparing to unpack .../028-fonts-dejavu-mono_2.37-8_all.deb ... 682s Unpacking fonts-dejavu-mono (2.37-8) ... 682s Selecting previously unselected package fonts-dejavu-core. 682s Preparing to unpack .../029-fonts-dejavu-core_2.37-8_all.deb ... 682s Unpacking fonts-dejavu-core (2.37-8) ... 682s Selecting previously unselected package fontconfig-config. 682s Preparing to unpack .../030-fontconfig-config_2.15.0-2ubuntu1_armhf.deb ... 683s Unpacking fontconfig-config (2.15.0-2ubuntu1) ... 683s Selecting previously unselected package libfontconfig1:armhf. 683s Preparing to unpack .../031-libfontconfig1_2.15.0-2ubuntu1_armhf.deb ... 683s Unpacking libfontconfig1:armhf (2.15.0-2ubuntu1) ... 683s Selecting previously unselected package fontconfig. 683s Preparing to unpack .../032-fontconfig_2.15.0-2ubuntu1_armhf.deb ... 683s Unpacking fontconfig (2.15.0-2ubuntu1) ... 683s Selecting previously unselected package libgfortran5:armhf. 683s Preparing to unpack .../033-libgfortran5_15-20250222-0ubuntu1_armhf.deb ... 683s Unpacking libgfortran5:armhf (15-20250222-0ubuntu1) ... 683s Selecting previously unselected package libgfortran-14-dev:armhf. 683s Preparing to unpack .../034-libgfortran-14-dev_14.2.0-17ubuntu3_armhf.deb ... 683s Unpacking libgfortran-14-dev:armhf (14.2.0-17ubuntu3) ... 683s Selecting previously unselected package gfortran-14-arm-linux-gnueabihf. 683s Preparing to unpack .../035-gfortran-14-arm-linux-gnueabihf_14.2.0-17ubuntu3_armhf.deb ... 683s Unpacking gfortran-14-arm-linux-gnueabihf (14.2.0-17ubuntu3) ... 684s Selecting previously unselected package gfortran-14. 684s Preparing to unpack .../036-gfortran-14_14.2.0-17ubuntu3_armhf.deb ... 684s Unpacking gfortran-14 (14.2.0-17ubuntu3) ... 684s Selecting previously unselected package gfortran-arm-linux-gnueabihf. 684s Preparing to unpack .../037-gfortran-arm-linux-gnueabihf_4%3a14.2.0-1ubuntu1_armhf.deb ... 684s Unpacking gfortran-arm-linux-gnueabihf (4:14.2.0-1ubuntu1) ... 684s Selecting previously unselected package gfortran. 684s Preparing to unpack .../038-gfortran_4%3a14.2.0-1ubuntu1_armhf.deb ... 684s Unpacking gfortran (4:14.2.0-1ubuntu1) ... 684s Selecting previously unselected package icu-devtools. 684s Preparing to unpack .../039-icu-devtools_76.1-1ubuntu2_armhf.deb ... 684s Unpacking icu-devtools (76.1-1ubuntu2) ... 684s Selecting previously unselected package libblas3:armhf. 684s Preparing to unpack .../040-libblas3_3.12.1-2_armhf.deb ... 684s Unpacking libblas3:armhf (3.12.1-2) ... 684s Selecting previously unselected package libblas-dev:armhf. 684s Preparing to unpack .../041-libblas-dev_3.12.1-2_armhf.deb ... 684s Unpacking libblas-dev:armhf (3.12.1-2) ... 684s Selecting previously unselected package libbz2-dev:armhf. 684s Preparing to unpack .../042-libbz2-dev_1.0.8-6_armhf.deb ... 684s Unpacking libbz2-dev:armhf (1.0.8-6) ... 684s Selecting previously unselected package libpixman-1-0:armhf. 684s Preparing to unpack .../043-libpixman-1-0_0.44.0-3_armhf.deb ... 684s Unpacking libpixman-1-0:armhf (0.44.0-3) ... 684s Selecting previously unselected package libxcb-render0:armhf. 684s Preparing to unpack .../044-libxcb-render0_1.17.0-2_armhf.deb ... 684s Unpacking libxcb-render0:armhf (1.17.0-2) ... 684s Selecting previously unselected package libxcb-shm0:armhf. 684s Preparing to unpack .../045-libxcb-shm0_1.17.0-2_armhf.deb ... 684s Unpacking libxcb-shm0:armhf (1.17.0-2) ... 684s Selecting previously unselected package libxrender1:armhf. 684s Preparing to unpack .../046-libxrender1_1%3a0.9.10-1.1build1_armhf.deb ... 684s Unpacking libxrender1:armhf (1:0.9.10-1.1build1) ... 684s Selecting previously unselected package libcairo2:armhf. 684s Preparing to unpack .../047-libcairo2_1.18.2-2_armhf.deb ... 684s Unpacking libcairo2:armhf (1.18.2-2) ... 684s Selecting previously unselected package libdatrie1:armhf. 684s Preparing to unpack .../048-libdatrie1_0.2.13-3build1_armhf.deb ... 684s Unpacking libdatrie1:armhf (0.2.13-3build1) ... 684s Selecting previously unselected package libdeflate0:armhf. 684s Preparing to unpack .../049-libdeflate0_1.23-1_armhf.deb ... 684s Unpacking libdeflate0:armhf (1.23-1) ... 684s Selecting previously unselected package libdeflate-dev:armhf. 685s Preparing to unpack .../050-libdeflate-dev_1.23-1_armhf.deb ... 685s Unpacking libdeflate-dev:armhf (1.23-1) ... 685s Selecting previously unselected package libgraphite2-3:armhf. 685s Preparing to unpack .../051-libgraphite2-3_1.3.14-2ubuntu1_armhf.deb ... 685s Unpacking libgraphite2-3:armhf (1.3.14-2ubuntu1) ... 685s Selecting previously unselected package libharfbuzz0b:armhf. 685s Preparing to unpack .../052-libharfbuzz0b_10.2.0-1_armhf.deb ... 685s Unpacking libharfbuzz0b:armhf (10.2.0-1) ... 685s Selecting previously unselected package x11-common. 685s Preparing to unpack .../053-x11-common_1%3a7.7+23ubuntu3_all.deb ... 685s Unpacking x11-common (1:7.7+23ubuntu3) ... 685s Selecting previously unselected package libice6:armhf. 685s Preparing to unpack .../054-libice6_2%3a1.1.1-1_armhf.deb ... 685s Unpacking libice6:armhf (2:1.1.1-1) ... 685s Selecting previously unselected package libicu-dev:armhf. 685s Preparing to unpack .../055-libicu-dev_76.1-1ubuntu2_armhf.deb ... 685s Unpacking libicu-dev:armhf (76.1-1ubuntu2) ... 685s Selecting previously unselected package libjpeg-turbo8:armhf. 685s Preparing to unpack .../056-libjpeg-turbo8_2.1.5-3ubuntu2_armhf.deb ... 685s Unpacking libjpeg-turbo8:armhf (2.1.5-3ubuntu2) ... 686s Selecting previously unselected package libjpeg-turbo8-dev:armhf. 686s Preparing to unpack .../057-libjpeg-turbo8-dev_2.1.5-3ubuntu2_armhf.deb ... 686s Unpacking libjpeg-turbo8-dev:armhf (2.1.5-3ubuntu2) ... 686s Selecting previously unselected package libjpeg8:armhf. 686s Preparing to unpack .../058-libjpeg8_8c-2ubuntu11_armhf.deb ... 686s Unpacking libjpeg8:armhf (8c-2ubuntu11) ... 686s Selecting previously unselected package libjpeg8-dev:armhf. 686s Preparing to unpack .../059-libjpeg8-dev_8c-2ubuntu11_armhf.deb ... 686s Unpacking libjpeg8-dev:armhf (8c-2ubuntu11) ... 686s Selecting previously unselected package libjpeg-dev:armhf. 686s Preparing to unpack .../060-libjpeg-dev_8c-2ubuntu11_armhf.deb ... 686s Unpacking libjpeg-dev:armhf (8c-2ubuntu11) ... 686s Selecting previously unselected package liblapack3:armhf. 686s Preparing to unpack .../061-liblapack3_3.12.1-2_armhf.deb ... 686s Unpacking liblapack3:armhf (3.12.1-2) ... 686s Selecting previously unselected package liblapack-dev:armhf. 686s Preparing to unpack .../062-liblapack-dev_3.12.1-2_armhf.deb ... 686s Unpacking liblapack-dev:armhf (3.12.1-2) ... 686s Selecting previously unselected package liblerc4:armhf. 686s Preparing to unpack .../063-liblerc4_4.0.0+ds-5ubuntu1_armhf.deb ... 686s Unpacking liblerc4:armhf (4.0.0+ds-5ubuntu1) ... 686s Selecting previously unselected package libncurses-dev:armhf. 686s Preparing to unpack .../064-libncurses-dev_6.5+20250216-2_armhf.deb ... 686s Unpacking libncurses-dev:armhf (6.5+20250216-2) ... 686s Selecting previously unselected package libthai-data. 686s Preparing to unpack .../065-libthai-data_0.1.29-2build1_all.deb ... 686s Unpacking libthai-data (0.1.29-2build1) ... 686s Selecting previously unselected package libthai0:armhf. 686s Preparing to unpack .../066-libthai0_0.1.29-2build1_armhf.deb ... 686s Unpacking libthai0:armhf (0.1.29-2build1) ... 686s Selecting previously unselected package libpango-1.0-0:armhf. 686s Preparing to unpack .../067-libpango-1.0-0_1.56.2-1_armhf.deb ... 686s Unpacking libpango-1.0-0:armhf (1.56.2-1) ... 686s Selecting previously unselected package libpangoft2-1.0-0:armhf. 686s Preparing to unpack .../068-libpangoft2-1.0-0_1.56.2-1_armhf.deb ... 686s Unpacking libpangoft2-1.0-0:armhf (1.56.2-1) ... 687s Selecting previously unselected package libpangocairo-1.0-0:armhf. 687s Preparing to unpack .../069-libpangocairo-1.0-0_1.56.2-1_armhf.deb ... 687s Unpacking libpangocairo-1.0-0:armhf (1.56.2-1) ... 687s Selecting previously unselected package libpaper2:armhf. 687s Preparing to unpack .../070-libpaper2_2.2.5-0.3_armhf.deb ... 687s Unpacking libpaper2:armhf (2.2.5-0.3) ... 687s Selecting previously unselected package libpaper-utils. 687s Preparing to unpack .../071-libpaper-utils_2.2.5-0.3_armhf.deb ... 687s Unpacking libpaper-utils (2.2.5-0.3) ... 687s Selecting previously unselected package libpcre2-16-0:armhf. 687s Preparing to unpack .../072-libpcre2-16-0_10.45-1_armhf.deb ... 687s Unpacking libpcre2-16-0:armhf (10.45-1) ... 687s Selecting previously unselected package libpcre2-32-0:armhf. 687s Preparing to unpack .../073-libpcre2-32-0_10.45-1_armhf.deb ... 687s Unpacking libpcre2-32-0:armhf (10.45-1) ... 687s Selecting previously unselected package libpcre2-posix3:armhf. 687s Preparing to unpack .../074-libpcre2-posix3_10.45-1_armhf.deb ... 687s Unpacking libpcre2-posix3:armhf (10.45-1) ... 687s Selecting previously unselected package libpcre2-dev:armhf. 687s Preparing to unpack .../075-libpcre2-dev_10.45-1_armhf.deb ... 687s Unpacking libpcre2-dev:armhf (10.45-1) ... 687s Selecting previously unselected package libpkgconf3:armhf. 687s Preparing to unpack .../076-libpkgconf3_1.8.1-4_armhf.deb ... 687s Unpacking libpkgconf3:armhf (1.8.1-4) ... 687s Selecting previously unselected package zlib1g-dev:armhf. 687s Preparing to unpack .../077-zlib1g-dev_1%3a1.3.dfsg+really1.3.1-1ubuntu1_armhf.deb ... 687s Unpacking zlib1g-dev:armhf (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 687s Selecting previously unselected package libpng-dev:armhf. 687s Preparing to unpack .../078-libpng-dev_1.6.47-1_armhf.deb ... 687s Unpacking libpng-dev:armhf (1.6.47-1) ... 687s Selecting previously unselected package libreadline-dev:armhf. 687s Preparing to unpack .../079-libreadline-dev_8.2-6_armhf.deb ... 687s Unpacking libreadline-dev:armhf (8.2-6) ... 687s Selecting previously unselected package libsharpyuv0:armhf. 687s Preparing to unpack .../080-libsharpyuv0_1.5.0-0.1_armhf.deb ... 687s Unpacking libsharpyuv0:armhf (1.5.0-0.1) ... 687s Selecting previously unselected package libsm6:armhf. 687s Preparing to unpack .../081-libsm6_2%3a1.2.4-1_armhf.deb ... 687s Unpacking libsm6:armhf (2:1.2.4-1) ... 687s Selecting previously unselected package libtcl8.6:armhf. 687s Preparing to unpack .../082-libtcl8.6_8.6.16+dfsg-1_armhf.deb ... 687s Unpacking libtcl8.6:armhf (8.6.16+dfsg-1) ... 688s Selecting previously unselected package libjbig0:armhf. 688s Preparing to unpack .../083-libjbig0_2.1-6.1ubuntu2_armhf.deb ... 688s Unpacking libjbig0:armhf (2.1-6.1ubuntu2) ... 688s Selecting previously unselected package libwebp7:armhf. 688s Preparing to unpack .../084-libwebp7_1.5.0-0.1_armhf.deb ... 688s Unpacking libwebp7:armhf (1.5.0-0.1) ... 688s Selecting previously unselected package libtiff6:armhf. 688s Preparing to unpack .../085-libtiff6_4.5.1+git230720-4ubuntu4_armhf.deb ... 688s Unpacking libtiff6:armhf (4.5.1+git230720-4ubuntu4) ... 688s Selecting previously unselected package libxft2:armhf. 688s Preparing to unpack .../086-libxft2_2.3.6-1build1_armhf.deb ... 688s Unpacking libxft2:armhf (2.3.6-1build1) ... 688s Selecting previously unselected package libxss1:armhf. 688s Preparing to unpack .../087-libxss1_1%3a1.2.3-1build3_armhf.deb ... 688s Unpacking libxss1:armhf (1:1.2.3-1build3) ... 688s Selecting previously unselected package libtk8.6:armhf. 688s Preparing to unpack .../088-libtk8.6_8.6.16-1_armhf.deb ... 688s Unpacking libtk8.6:armhf (8.6.16-1) ... 688s Selecting previously unselected package libxt6t64:armhf. 688s Preparing to unpack .../089-libxt6t64_1%3a1.2.1-1.2build1_armhf.deb ... 688s Unpacking libxt6t64:armhf (1:1.2.1-1.2build1) ... 688s Selecting previously unselected package zip. 688s Preparing to unpack .../090-zip_3.0-14ubuntu2_armhf.deb ... 688s Unpacking zip (3.0-14ubuntu2) ... 688s Selecting previously unselected package unzip. 688s Preparing to unpack .../091-unzip_6.0-28ubuntu6_armhf.deb ... 688s Unpacking unzip (6.0-28ubuntu6) ... 688s Selecting previously unselected package xdg-utils. 688s Preparing to unpack .../092-xdg-utils_1.2.1-2ubuntu1_all.deb ... 688s Unpacking xdg-utils (1.2.1-2ubuntu1) ... 688s Selecting previously unselected package r-base-core. 688s Preparing to unpack .../093-r-base-core_4.4.3-1_armhf.deb ... 688s Unpacking r-base-core (4.4.3-1) ... 689s Selecting previously unselected package liblzma-dev:armhf. 689s Preparing to unpack .../094-liblzma-dev_5.6.4-1_armhf.deb ... 689s Unpacking liblzma-dev:armhf (5.6.4-1) ... 689s Selecting previously unselected package pkgconf-bin. 689s Preparing to unpack .../095-pkgconf-bin_1.8.1-4_armhf.deb ... 689s Unpacking pkgconf-bin (1.8.1-4) ... 689s Selecting previously unselected package pkgconf:armhf. 689s Preparing to unpack .../096-pkgconf_1.8.1-4_armhf.deb ... 689s Unpacking pkgconf:armhf (1.8.1-4) ... 689s Selecting previously unselected package libtirpc-dev:armhf. 689s Preparing to unpack .../097-libtirpc-dev_1.3.4+ds-1.3_armhf.deb ... 689s Unpacking libtirpc-dev:armhf (1.3.4+ds-1.3) ... 689s Selecting previously unselected package r-base-dev. 689s Preparing to unpack .../098-r-base-dev_4.4.3-1_all.deb ... 689s Unpacking r-base-dev (4.4.3-1) ... 689s Selecting previously unselected package pkg-r-autopkgtest. 689s Preparing to unpack .../099-pkg-r-autopkgtest_20231212ubuntu1_all.deb ... 689s Unpacking pkg-r-autopkgtest (20231212ubuntu1) ... 689s Selecting previously unselected package r-cran-lattice. 689s Preparing to unpack .../100-r-cran-lattice_0.22-6-1_armhf.deb ... 689s Unpacking r-cran-lattice (0.22-6-1) ... 689s Selecting previously unselected package r-cran-matrix. 690s Preparing to unpack .../101-r-cran-matrix_1.7-3-1_armhf.deb ... 690s Unpacking r-cran-matrix (1.7-3-1) ... 690s Selecting previously unselected package r-cran-expm. 690s Preparing to unpack .../102-r-cran-expm_1.0-0-1_armhf.deb ... 690s Unpacking r-cran-expm (1.0-0-1) ... 690s Selecting previously unselected package r-cran-rcolorbrewer. 690s Preparing to unpack .../103-r-cran-rcolorbrewer_1.1-3-1build1_all.deb ... 690s Unpacking r-cran-rcolorbrewer (1.1-3-1build1) ... 690s Selecting previously unselected package r-cran-sfsmisc. 690s Preparing to unpack .../104-r-cran-sfsmisc_1.1-20-1_all.deb ... 690s Unpacking r-cran-sfsmisc (1.1-20-1) ... 690s Setting up libgraphite2-3:armhf (1.3.14-2ubuntu1) ... 690s Setting up libpixman-1-0:armhf (0.44.0-3) ... 690s Setting up libsharpyuv0:armhf (1.5.0-0.1) ... 690s Setting up liblerc4:armhf (4.0.0+ds-5ubuntu1) ... 690s Setting up libxrender1:armhf (1:0.9.10-1.1build1) ... 690s Setting up libdatrie1:armhf (0.2.13-3build1) ... 690s Setting up libxcb-render0:armhf (1.17.0-2) ... 690s Setting up unzip (6.0-28ubuntu6) ... 690s Setting up x11-common (1:7.7+23ubuntu3) ... 690s Setting up libdeflate0:armhf (1.23-1) ... 690s Setting up linux-libc-dev:armhf (6.14.0-10.10) ... 690s Setting up libxcb-shm0:armhf (1.17.0-2) ... 690s Setting up libgomp1:armhf (15-20250222-0ubuntu1) ... 690s Setting up libjbig0:armhf (2.1-6.1ubuntu2) ... 690s Setting up libpcre2-16-0:armhf (10.45-1) ... 690s Setting up zip (3.0-14ubuntu2) ... 690s Setting up libpcre2-32-0:armhf (10.45-1) ... 690s Setting up libblas3:armhf (3.12.1-2) ... 690s update-alternatives: using /usr/lib/arm-linux-gnueabihf/blas/libblas.so.3 to provide /usr/lib/arm-linux-gnueabihf/libblas.so.3 (libblas.so.3-arm-linux-gnueabihf) in auto mode 691s Setting up libtirpc-dev:armhf (1.3.4+ds-1.3) ... 691s Setting up libpkgconf3:armhf (1.8.1-4) ... 691s Setting up rpcsvc-proto (1.4.2-0ubuntu7) ... 691s Setting up libfreetype6:armhf (2.13.3+dfsg-1) ... 691s Setting up fonts-dejavu-mono (2.37-8) ... 691s Setting up libmpc3:armhf (1.3.1-1build2) ... 691s Setting up libtcl8.6:armhf (8.6.16+dfsg-1) ... 691s Setting up icu-devtools (76.1-1ubuntu2) ... 691s Setting up fonts-dejavu-core (2.37-8) ... 691s Setting up pkgconf-bin (1.8.1-4) ... 691s Setting up libjpeg-turbo8:armhf (2.1.5-3ubuntu2) ... 691s Setting up libgfortran5:armhf (15-20250222-0ubuntu1) ... 691s Setting up libwebp7:armhf (1.5.0-0.1) ... 691s Setting up liblzma-dev:armhf (5.6.4-1) ... 691s Setting up libubsan1:armhf (15-20250222-0ubuntu1) ... 691s Setting up libpcre2-posix3:armhf (10.45-1) ... 691s Setting up libcrypt-dev:armhf (1:4.4.38-1) ... 691s Setting up libasan8:armhf (15-20250222-0ubuntu1) ... 691s Setting up libharfbuzz0b:armhf (10.2.0-1) ... 691s Setting up libthai-data (0.1.29-2build1) ... 691s Setting up libxss1:armhf (1:1.2.3-1build3) ... 691s Setting up libpaper2:armhf (2.2.5-0.3) ... 691s Setting up libgcc-14-dev:armhf (14.2.0-17ubuntu3) ... 691s Setting up libisl23:armhf (0.27-1) ... 691s Setting up libc-dev-bin (2.41-1ubuntu2) ... 691s Setting up libdeflate-dev:armhf (1.23-1) ... 691s Setting up xdg-utils (1.2.1-2ubuntu1) ... 691s update-alternatives: using /usr/bin/xdg-open to provide /usr/bin/open (open) in auto mode 691s Setting up libcc1-0:armhf (15-20250222-0ubuntu1) ... 691s Setting up libblas-dev:armhf (3.12.1-2) ... 691s update-alternatives: using /usr/lib/arm-linux-gnueabihf/blas/libblas.so to provide /usr/lib/arm-linux-gnueabihf/libblas.so (libblas.so-arm-linux-gnueabihf) in auto mode 691s Setting up dctrl-tools (2.24-3build3) ... 691s Setting up cpp-14-arm-linux-gnueabihf (14.2.0-17ubuntu3) ... 691s Setting up libjpeg8:armhf (8c-2ubuntu11) ... 691s Setting up libgfortran-14-dev:armhf (14.2.0-17ubuntu3) ... 691s Setting up libice6:armhf (2:1.1.1-1) ... 691s Setting up liblapack3:armhf (3.12.1-2) ... 691s update-alternatives: using /usr/lib/arm-linux-gnueabihf/lapack/liblapack.so.3 to provide /usr/lib/arm-linux-gnueabihf/liblapack.so.3 (liblapack.so.3-arm-linux-gnueabihf) in auto mode 691s Setting up fontconfig-config (2.15.0-2ubuntu1) ... 691s Setting up gcc-14-arm-linux-gnueabihf (14.2.0-17ubuntu3) ... 691s Setting up libpaper-utils (2.2.5-0.3) ... 691s Setting up pkgconf:armhf (1.8.1-4) ... 691s Setting up libthai0:armhf (0.1.29-2build1) ... 691s Setting up liblapack-dev:armhf (3.12.1-2) ... 691s update-alternatives: using /usr/lib/arm-linux-gnueabihf/lapack/liblapack.so to provide /usr/lib/arm-linux-gnueabihf/liblapack.so (liblapack.so-arm-linux-gnueabihf) in auto mode 691s Setting up cpp-14 (14.2.0-17ubuntu3) ... 691s Setting up libtiff6:armhf (4.5.1+git230720-4ubuntu4) ... 691s Setting up libc6-dev:armhf (2.41-1ubuntu2) ... 691s Setting up libfontconfig1:armhf (2.15.0-2ubuntu1) ... 691s Setting up libstdc++-14-dev:armhf (14.2.0-17ubuntu3) ... 691s Setting up libsm6:armhf (2:1.2.4-1) ... 691s Setting up libicu-dev:armhf (76.1-1ubuntu2) ... 691s Setting up cpp-arm-linux-gnueabihf (4:14.2.0-1ubuntu1) ... 691s Setting up gfortran-14-arm-linux-gnueabihf (14.2.0-17ubuntu3) ... 691s Setting up libbz2-dev:armhf (1.0.8-6) ... 691s Setting up gcc-arm-linux-gnueabihf (4:14.2.0-1ubuntu1) ... 691s Setting up g++-14-arm-linux-gnueabihf (14.2.0-17ubuntu3) ... 691s Setting up fontconfig (2.15.0-2ubuntu1) ... 693s Regenerating fonts cache... done. 693s Setting up libjpeg-turbo8-dev:armhf (2.1.5-3ubuntu2) ... 693s Setting up libxft2:armhf (2.3.6-1build1) ... 693s Setting up libncurses-dev:armhf (6.5+20250216-2) ... 693s Setting up libpcre2-dev:armhf (10.45-1) ... 693s Setting up libtk8.6:armhf (8.6.16-1) ... 693s Setting up libpango-1.0-0:armhf (1.56.2-1) ... 693s Setting up libreadline-dev:armhf (8.2-6) ... 693s Setting up libcairo2:armhf (1.18.2-2) ... 693s Setting up gcc-14 (14.2.0-17ubuntu3) ... 693s Setting up gfortran-arm-linux-gnueabihf (4:14.2.0-1ubuntu1) ... 693s Setting up libxt6t64:armhf (1:1.2.1-1.2build1) ... 693s Setting up zlib1g-dev:armhf (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 693s Setting up cpp (4:14.2.0-1ubuntu1) ... 693s Setting up g++-14 (14.2.0-17ubuntu3) ... 693s Setting up libpangoft2-1.0-0:armhf (1.56.2-1) ... 693s Setting up libjpeg8-dev:armhf (8c-2ubuntu11) ... 693s Setting up gfortran-14 (14.2.0-17ubuntu3) ... 693s Setting up libpangocairo-1.0-0:armhf (1.56.2-1) ... 693s Setting up g++-arm-linux-gnueabihf (4:14.2.0-1ubuntu1) ... 693s Setting up libpng-dev:armhf (1.6.47-1) ... 693s Setting up libjpeg-dev:armhf (8c-2ubuntu11) ... 693s Setting up gcc (4:14.2.0-1ubuntu1) ... 693s Setting up r-base-core (4.4.3-1) ... 694s Creating config file /etc/R/Renviron with new version 694s Setting up r-cran-lattice (0.22-6-1) ... 694s Setting up g++ (4:14.2.0-1ubuntu1) ... 694s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 694s Setting up build-essential (12.10ubuntu1) ... 694s Setting up r-cran-sfsmisc (1.1-20-1) ... 694s Setting up gfortran (4:14.2.0-1ubuntu1) ... 694s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f95 (f95) in auto mode 694s update-alternatives: warning: skip creation of /usr/share/man/man1/f95.1.gz because associated file /usr/share/man/man1/gfortran.1.gz (of link group f95) doesn't exist 694s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f77 (f77) in auto mode 694s update-alternatives: warning: skip creation of /usr/share/man/man1/f77.1.gz because associated file /usr/share/man/man1/gfortran.1.gz (of link group f77) doesn't exist 694s Setting up r-cran-rcolorbrewer (1.1-3-1build1) ... 694s Setting up r-cran-matrix (1.7-3-1) ... 694s Setting up r-base-dev (4.4.3-1) ... 694s Setting up r-cran-expm (1.0-0-1) ... 694s Setting up pkg-r-autopkgtest (20231212ubuntu1) ... 694s Processing triggers for libc-bin (2.41-1ubuntu2) ... 694s Processing triggers for man-db (2.13.0-1) ... 695s Processing triggers for install-info (7.1.1-1) ... 709s autopkgtest [16:18:02]: test pkg-r-autopkgtest: /usr/share/dh-r/pkg-r-autopkgtest 709s autopkgtest [16:18:02]: test pkg-r-autopkgtest: [----------------------- 711s Test: Try to load the R library expm 712s 712s R version 4.4.3 (2025-02-28) -- "Trophy Case" 712s Copyright (C) 2025 The R Foundation for Statistical Computing 712s Platform: arm-unknown-linux-gnueabihf (32-bit) 712s 712s R is free software and comes with ABSOLUTELY NO WARRANTY. 712s You are welcome to redistribute it under certain conditions. 712s Type 'license()' or 'licence()' for distribution details. 712s 712s R is a collaborative project with many contributors. 712s Type 'contributors()' for more information and 712s 'citation()' on how to cite R or R packages in publications. 712s 712s Type 'demo()' for some demos, 'help()' for on-line help, or 712s 'help.start()' for an HTML browser interface to help. 712s Type 'q()' to quit R. 712s 712s > library('expm') 712s Loading required package: Matrix 713s 713s Attaching package: ‘expm’ 713s 713s > 713s > 713s The following object is masked from ‘package:Matrix’: 713s 713s expm 713s 713s Other tests are currently unsupported! 713s They will be progressively added. 713s autopkgtest [16:18:06]: test pkg-r-autopkgtest: -----------------------] 717s pkg-r-autopkgtest PASS 717s autopkgtest [16:18:10]: test pkg-r-autopkgtest: - - - - - - - - - - results - - - - - - - - - - 721s autopkgtest [16:18:14]: @@@@@@@@@@@@@@@@@@@@ summary 721s run-unit-test PASS 721s pkg-r-autopkgtest PASS