0s autopkgtest [15:25:22]: starting date and time: 2025-03-15 15:25:22+0000 0s autopkgtest [15:25:22]: git checkout: 325255d2 Merge branch 'pin-any-arch' into 'ubuntu/production' 0s autopkgtest [15:25:22]: host juju-7f2275-prod-proposed-migration-environment-2; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.f_gh5a70/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --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 -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-2@bos03-arm64-27.secgroup --name adt-plucky-arm64-r-cran-expm-20250315-152522-juju-7f2275-prod-proposed-migration-environment-2-3e28b34b-3992-4277-b640-eb8fbe2ee721 --image adt/ubuntu-plucky-arm64-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-2 --net-id=net_prod-proposed-migration -e TERM=linux -e ''"'"'http_proxy=http://squid.internal:3128'"'"'' -e ''"'"'https_proxy=http://squid.internal:3128'"'"'' -e ''"'"'no_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'"'"'' --mirror=http://ftpmaster.internal/ubuntu/ 162s autopkgtest [15:28:04]: testbed dpkg architecture: arm64 162s autopkgtest [15:28:04]: testbed apt version: 2.9.33 162s autopkgtest [15:28:04]: @@@@@@@@@@@@@@@@@@@@ test bed setup 163s autopkgtest [15:28:05]: testbed release detected to be: None 163s autopkgtest [15:28:05]: updating testbed package index (apt update) 164s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [126 kB] 164s Hit:2 http://ftpmaster.internal/ubuntu plucky InRelease 164s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 164s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 164s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [404 kB] 165s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [101 kB] 165s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [15.8 kB] 165s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 Packages [78.2 kB] 165s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 c-n-f Metadata [1976 B] 165s Get:10 http://ftpmaster.internal/ubuntu plucky-proposed/restricted arm64 c-n-f Metadata [116 B] 165s Get:11 http://ftpmaster.internal/ubuntu plucky-proposed/universe arm64 Packages [346 kB] 165s Get:12 http://ftpmaster.internal/ubuntu plucky-proposed/universe arm64 c-n-f Metadata [15.8 kB] 165s Get:13 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse arm64 Packages [4948 B] 165s Get:14 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse arm64 c-n-f Metadata [572 B] 166s Fetched 1094 kB in 2s (646 kB/s) 167s Reading package lists... 168s Reading package lists... 168s Building dependency tree... 168s Reading state information... 169s Calculating upgrade... 169s Calculating upgrade... 169s The following packages will be upgraded: 169s python3-jinja2 strace 169s 2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 169s Need to get 608 kB of archives. 169s After this operation, 11.3 kB of additional disk space will be used. 169s Get:1 http://ftpmaster.internal/ubuntu plucky/main arm64 strace arm64 6.13+ds-1ubuntu1 [499 kB] 170s Get:2 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-jinja2 all 3.1.5-2ubuntu1 [109 kB] 171s Fetched 608 kB in 1s (624 kB/s) 171s (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 ... 117701 files and directories currently installed.) 171s Preparing to unpack .../strace_6.13+ds-1ubuntu1_arm64.deb ... 171s Unpacking strace (6.13+ds-1ubuntu1) over (6.11-0ubuntu1) ... 171s Preparing to unpack .../python3-jinja2_3.1.5-2ubuntu1_all.deb ... 171s Unpacking python3-jinja2 (3.1.5-2ubuntu1) over (3.1.5-2) ... 171s Setting up python3-jinja2 (3.1.5-2ubuntu1) ... 172s Setting up strace (6.13+ds-1ubuntu1) ... 172s Processing triggers for man-db (2.13.0-1) ... 173s Reading package lists... 173s Building dependency tree... 173s Reading state information... 173s Solving dependencies... 174s The following packages will be REMOVED: 174s libnsl2* libpython3.12-minimal* libpython3.12-stdlib* libpython3.12t64* 174s libunwind8* linux-headers-6.11.0-8* linux-headers-6.11.0-8-generic* 174s linux-image-6.11.0-8-generic* linux-modules-6.11.0-8-generic* 174s linux-tools-6.11.0-8* linux-tools-6.11.0-8-generic* 174s 0 upgraded, 0 newly installed, 11 to remove and 5 not upgraded. 174s After this operation, 267 MB disk space will be freed. 174s (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 ... 117701 files and directories currently installed.) 174s Removing linux-tools-6.11.0-8-generic (6.11.0-8.8) ... 174s Removing linux-tools-6.11.0-8 (6.11.0-8.8) ... 174s Removing libpython3.12t64:arm64 (3.12.9-1) ... 174s Removing libpython3.12-stdlib:arm64 (3.12.9-1) ... 174s Removing libnsl2:arm64 (1.3.0-3build3) ... 174s Removing libpython3.12-minimal:arm64 (3.12.9-1) ... 175s Removing libunwind8:arm64 (1.6.2-3.1) ... 175s Removing linux-headers-6.11.0-8-generic (6.11.0-8.8) ... 175s Removing linux-headers-6.11.0-8 (6.11.0-8.8) ... 177s Removing linux-image-6.11.0-8-generic (6.11.0-8.8) ... 177s I: /boot/vmlinuz.old is now a symlink to vmlinuz-6.14.0-10-generic 177s I: /boot/initrd.img.old is now a symlink to initrd.img-6.14.0-10-generic 177s /etc/kernel/postrm.d/initramfs-tools: 177s update-initramfs: Deleting /boot/initrd.img-6.11.0-8-generic 178s /etc/kernel/postrm.d/zz-flash-kernel: 178s flash-kernel: Kernel 6.11.0-8-generic has been removed. 178s flash-kernel: A higher version (6.14.0-10-generic) is still installed, no reflashing required. 178s /etc/kernel/postrm.d/zz-update-grub: 178s Sourcing file `/etc/default/grub' 178s Sourcing file `/etc/default/grub.d/50-cloudimg-settings.cfg' 178s Generating grub configuration file ... 178s Found linux image: /boot/vmlinuz-6.14.0-10-generic 178s Found initrd image: /boot/initrd.img-6.14.0-10-generic 179s Warning: os-prober will not be executed to detect other bootable partitions. 179s Systems on them will not be added to the GRUB boot configuration. 179s Check GRUB_DISABLE_OS_PROBER documentation entry. 179s Adding boot menu entry for UEFI Firmware Settings ... 179s done 179s Removing linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 179s Processing triggers for libc-bin (2.41-1ubuntu1) ... 179s (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 ... 81650 files and directories currently installed.) 179s Purging configuration files for linux-image-6.11.0-8-generic (6.11.0-8.8) ... 180s Purging configuration files for libpython3.12-minimal:arm64 (3.12.9-1) ... 180s Purging configuration files for linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 180s autopkgtest [15:28:22]: upgrading testbed (apt dist-upgrade and autopurge) 180s Reading package lists... 180s Building dependency tree... 180s Reading state information... 181s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 181s Starting 2 pkgProblemResolver with broken count: 0 181s Done 182s Entering ResolveByKeep 182s 183s Calculating upgrade... 183s The following packages will be upgraded: 183s libc-bin libc-dev-bin libc6 libc6-dev locales 183s 5 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 183s Need to get 9530 kB of archives. 183s After this operation, 0 B of additional disk space will be used. 183s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 libc6-dev arm64 2.41-1ubuntu2 [1750 kB] 185s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 libc-dev-bin arm64 2.41-1ubuntu2 [24.0 kB] 185s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 libc6 arm64 2.41-1ubuntu2 [2910 kB] 187s Get:4 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 libc-bin arm64 2.41-1ubuntu2 [600 kB] 188s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 locales all 2.41-1ubuntu2 [4246 kB] 192s Preconfiguring packages ... 192s Fetched 9530 kB in 9s (1062 kB/s) 193s (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 ... 81647 files and directories currently installed.) 193s Preparing to unpack .../libc6-dev_2.41-1ubuntu2_arm64.deb ... 193s Unpacking libc6-dev:arm64 (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 193s Preparing to unpack .../libc-dev-bin_2.41-1ubuntu2_arm64.deb ... 193s Unpacking libc-dev-bin (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 193s Preparing to unpack .../libc6_2.41-1ubuntu2_arm64.deb ... 193s Unpacking libc6:arm64 (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 193s Setting up libc6:arm64 (2.41-1ubuntu2) ... 193s (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 ... 81647 files and directories currently installed.) 193s Preparing to unpack .../libc-bin_2.41-1ubuntu2_arm64.deb ... 193s Unpacking libc-bin (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 194s Setting up libc-bin (2.41-1ubuntu2) ... 194s (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 ... 81647 files and directories currently installed.) 194s Preparing to unpack .../locales_2.41-1ubuntu2_all.deb ... 194s Unpacking locales (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 194s Setting up locales (2.41-1ubuntu2) ... 195s Generating locales (this might take a while)... 197s en_US.UTF-8... done 197s Generation complete. 197s Setting up libc-dev-bin (2.41-1ubuntu2) ... 197s Setting up libc6-dev:arm64 (2.41-1ubuntu2) ... 197s Processing triggers for man-db (2.13.0-1) ... 198s Processing triggers for systemd (257.3-1ubuntu3) ... 199s Reading package lists... 199s Building dependency tree... 199s Reading state information... 199s Starting pkgProblemResolver with broken count: 0 199s Starting 2 pkgProblemResolver with broken count: 0 200s Done 200s Solving dependencies... 200s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 201s autopkgtest [15:28:43]: rebooting testbed after setup commands that affected boot 224s autopkgtest [15:29:06]: testbed running kernel: Linux 6.14.0-10-generic #10-Ubuntu SMP PREEMPT_DYNAMIC Wed Mar 12 15:45:31 UTC 2025 227s autopkgtest [15:29:09]: @@@@@@@@@@@@@@@@@@@@ apt-source r-cran-expm 229s Get:1 http://ftpmaster.internal/ubuntu plucky/universe r-cran-expm 1.0-0-1 (dsc) [2115 B] 229s Get:2 http://ftpmaster.internal/ubuntu plucky/universe r-cran-expm 1.0-0-1 (tar) [141 kB] 229s Get:3 http://ftpmaster.internal/ubuntu plucky/universe r-cran-expm 1.0-0-1 (diff) [3176 B] 230s gpgv: Signature made Mon Oct 7 04:29:42 2024 UTC 230s gpgv: using RSA key 73471499CC60ED9EEE805946C5BD6C8F2295D502 230s gpgv: issuer "plessy@debian.org" 230s gpgv: Can't check signature: No public key 230s dpkg-source: warning: cannot verify inline signature for ./r-cran-expm_1.0-0-1.dsc: no acceptable signature found 230s autopkgtest [15:29:12]: testing package r-cran-expm version 1.0-0-1 230s autopkgtest [15:29:12]: build not needed 232s autopkgtest [15:29:14]: test run-unit-test: preparing testbed 233s Reading package lists... 233s Building dependency tree... 233s Reading state information... 233s Starting pkgProblemResolver with broken count: 0 233s Starting 2 pkgProblemResolver with broken count: 0 233s Done 234s The following NEW packages will be installed: 234s fontconfig fontconfig-config fonts-dejavu-core fonts-dejavu-mono libblas3 234s libcairo2 libdatrie1 libdeflate0 libfontconfig1 libgfortran5 libgomp1 234s libgraphite2-3 libharfbuzz0b libice6 libjbig0 libjpeg-turbo8 libjpeg8 234s liblapack3 liblerc4 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 234s libpaper-utils libpaper2 libpixman-1-0 libsharpyuv0 libsm6 libtcl8.6 234s libthai-data libthai0 libtiff6 libtk8.6 libwebp7 libxcb-render0 libxcb-shm0 234s libxft2 libxrender1 libxss1 libxt6t64 r-base-core r-cran-expm r-cran-gmp 234s r-cran-lattice r-cran-matrix r-cran-rcolorbrewer r-cran-rmpfr r-cran-sfsmisc 234s unzip x11-common xdg-utils zip 234s 0 upgraded, 51 newly installed, 0 to remove and 0 not upgraded. 234s Need to get 46.2 MB of archives. 234s After this operation, 92.5 MB of additional disk space will be used. 234s Get:1 http://ftpmaster.internal/ubuntu plucky/main arm64 fonts-dejavu-mono all 2.37-8 [502 kB] 235s Get:2 http://ftpmaster.internal/ubuntu plucky/main arm64 fonts-dejavu-core all 2.37-8 [835 kB] 236s Get:3 http://ftpmaster.internal/ubuntu plucky/main arm64 fontconfig-config arm64 2.15.0-2ubuntu1 [37.5 kB] 236s Get:4 http://ftpmaster.internal/ubuntu plucky/main arm64 libfontconfig1 arm64 2.15.0-2ubuntu1 [144 kB] 236s Get:5 http://ftpmaster.internal/ubuntu plucky/main arm64 fontconfig arm64 2.15.0-2ubuntu1 [191 kB] 236s Get:6 http://ftpmaster.internal/ubuntu plucky/main arm64 libblas3 arm64 3.12.1-2 [161 kB] 236s Get:7 http://ftpmaster.internal/ubuntu plucky/main arm64 libpixman-1-0 arm64 0.44.0-3 [197 kB] 237s Get:8 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-render0 arm64 1.17.0-2 [16.6 kB] 237s Get:9 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-shm0 arm64 1.17.0-2 [5884 B] 237s Get:10 http://ftpmaster.internal/ubuntu plucky/main arm64 libxrender1 arm64 1:0.9.10-1.1build1 [18.8 kB] 237s Get:11 http://ftpmaster.internal/ubuntu plucky/main arm64 libcairo2 arm64 1.18.2-2 [560 kB] 237s Get:12 http://ftpmaster.internal/ubuntu plucky/main arm64 libdatrie1 arm64 0.2.13-3build1 [19.2 kB] 237s Get:13 http://ftpmaster.internal/ubuntu plucky/main arm64 libdeflate0 arm64 1.23-1 [46.2 kB] 237s Get:14 http://ftpmaster.internal/ubuntu plucky/main arm64 libgfortran5 arm64 15-20250222-0ubuntu1 [444 kB] 238s Get:15 http://ftpmaster.internal/ubuntu plucky/main arm64 libgomp1 arm64 15-20250222-0ubuntu1 [146 kB] 238s Get:16 http://ftpmaster.internal/ubuntu plucky/main arm64 libgraphite2-3 arm64 1.3.14-2ubuntu1 [70.6 kB] 238s Get:17 http://ftpmaster.internal/ubuntu plucky/main arm64 libharfbuzz0b arm64 10.2.0-1 [490 kB] 239s Get:18 http://ftpmaster.internal/ubuntu plucky/main arm64 x11-common all 1:7.7+23ubuntu3 [21.7 kB] 239s Get:19 http://ftpmaster.internal/ubuntu plucky/main arm64 libice6 arm64 2:1.1.1-1 [42.3 kB] 239s Get:20 http://ftpmaster.internal/ubuntu plucky/main arm64 libjpeg-turbo8 arm64 2.1.5-3ubuntu2 [165 kB] 239s Get:21 http://ftpmaster.internal/ubuntu plucky/main arm64 libjpeg8 arm64 8c-2ubuntu11 [2148 B] 239s Get:22 http://ftpmaster.internal/ubuntu plucky/main arm64 liblapack3 arm64 3.12.1-2 [2307 kB] 242s Get:23 http://ftpmaster.internal/ubuntu plucky/main arm64 liblerc4 arm64 4.0.0+ds-5ubuntu1 [167 kB] 242s Get:24 http://ftpmaster.internal/ubuntu plucky/main arm64 libthai-data all 0.1.29-2build1 [158 kB] 242s Get:25 http://ftpmaster.internal/ubuntu plucky/main arm64 libthai0 arm64 0.1.29-2build1 [18.2 kB] 242s Get:26 http://ftpmaster.internal/ubuntu plucky/main arm64 libpango-1.0-0 arm64 1.56.2-1 [237 kB] 242s Get:27 http://ftpmaster.internal/ubuntu plucky/main arm64 libpangoft2-1.0-0 arm64 1.56.2-1 [49.5 kB] 242s Get:28 http://ftpmaster.internal/ubuntu plucky/main arm64 libpangocairo-1.0-0 arm64 1.56.2-1 [27.6 kB] 242s Get:29 http://ftpmaster.internal/ubuntu plucky/main arm64 libpaper2 arm64 2.2.5-0.3 [17.3 kB] 242s Get:30 http://ftpmaster.internal/ubuntu plucky/main arm64 libpaper-utils arm64 2.2.5-0.3 [15.4 kB] 242s Get:31 http://ftpmaster.internal/ubuntu plucky/main arm64 libsharpyuv0 arm64 1.5.0-0.1 [16.9 kB] 242s Get:32 http://ftpmaster.internal/ubuntu plucky/main arm64 libsm6 arm64 2:1.2.4-1 [16.4 kB] 242s Get:33 http://ftpmaster.internal/ubuntu plucky/main arm64 libtcl8.6 arm64 8.6.16+dfsg-1 [987 kB] 243s Get:34 http://ftpmaster.internal/ubuntu plucky/main arm64 libjbig0 arm64 2.1-6.1ubuntu2 [29.3 kB] 243s Get:35 http://ftpmaster.internal/ubuntu plucky/main arm64 libwebp7 arm64 1.5.0-0.1 [194 kB] 244s Get:36 http://ftpmaster.internal/ubuntu plucky/main arm64 libtiff6 arm64 4.5.1+git230720-4ubuntu4 [193 kB] 244s Get:37 http://ftpmaster.internal/ubuntu plucky/main arm64 libxft2 arm64 2.3.6-1build1 [44.1 kB] 244s Get:38 http://ftpmaster.internal/ubuntu plucky/main arm64 libxss1 arm64 1:1.2.3-1build3 [7244 B] 244s Get:39 http://ftpmaster.internal/ubuntu plucky/main arm64 libtk8.6 arm64 8.6.16-1 [776 kB] 245s Get:40 http://ftpmaster.internal/ubuntu plucky/main arm64 libxt6t64 arm64 1:1.2.1-1.2build1 [168 kB] 245s Get:41 http://ftpmaster.internal/ubuntu plucky/main arm64 zip arm64 3.0-14ubuntu2 [173 kB] 245s Get:42 http://ftpmaster.internal/ubuntu plucky/main arm64 unzip arm64 6.0-28ubuntu6 [178 kB] 246s Get:43 http://ftpmaster.internal/ubuntu plucky/main arm64 xdg-utils all 1.2.1-2ubuntu1 [66.0 kB] 246s Get:44 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-base-core arm64 4.4.3-1 [28.4 MB] 277s Get:45 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-lattice arm64 0.22-6-1 [1363 kB] 279s Get:46 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-matrix arm64 1.7-3-1 [4045 kB] 284s Get:47 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-expm arm64 1.0-0-1 [225 kB] 284s Get:48 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-gmp arm64 0.7-5-1 [307 kB] 284s Get:49 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-rcolorbrewer all 1.1-3-1build1 [55.4 kB] 284s Get:50 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-rmpfr arm64 0.9-5-1 [1219 kB] 286s Get:51 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-sfsmisc all 1.1-20-1 [674 kB] 287s Preconfiguring packages ... 287s Fetched 46.2 MB in 52s (884 kB/s) 287s Selecting previously unselected package fonts-dejavu-mono. 287s (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 ... 81647 files and directories currently installed.) 287s Preparing to unpack .../00-fonts-dejavu-mono_2.37-8_all.deb ... 287s Unpacking fonts-dejavu-mono (2.37-8) ... 287s Selecting previously unselected package fonts-dejavu-core. 287s Preparing to unpack .../01-fonts-dejavu-core_2.37-8_all.deb ... 287s Unpacking fonts-dejavu-core (2.37-8) ... 287s Selecting previously unselected package fontconfig-config. 288s Preparing to unpack .../02-fontconfig-config_2.15.0-2ubuntu1_arm64.deb ... 288s Unpacking fontconfig-config (2.15.0-2ubuntu1) ... 288s Selecting previously unselected package libfontconfig1:arm64. 288s Preparing to unpack .../03-libfontconfig1_2.15.0-2ubuntu1_arm64.deb ... 288s Unpacking libfontconfig1:arm64 (2.15.0-2ubuntu1) ... 288s Selecting previously unselected package fontconfig. 288s Preparing to unpack .../04-fontconfig_2.15.0-2ubuntu1_arm64.deb ... 288s Unpacking fontconfig (2.15.0-2ubuntu1) ... 288s Selecting previously unselected package libblas3:arm64. 288s Preparing to unpack .../05-libblas3_3.12.1-2_arm64.deb ... 288s Unpacking libblas3:arm64 (3.12.1-2) ... 288s Selecting previously unselected package libpixman-1-0:arm64. 288s Preparing to unpack .../06-libpixman-1-0_0.44.0-3_arm64.deb ... 288s Unpacking libpixman-1-0:arm64 (0.44.0-3) ... 288s Selecting previously unselected package libxcb-render0:arm64. 288s Preparing to unpack .../07-libxcb-render0_1.17.0-2_arm64.deb ... 288s Unpacking libxcb-render0:arm64 (1.17.0-2) ... 288s Selecting previously unselected package libxcb-shm0:arm64. 288s Preparing to unpack .../08-libxcb-shm0_1.17.0-2_arm64.deb ... 288s Unpacking libxcb-shm0:arm64 (1.17.0-2) ... 288s Selecting previously unselected package libxrender1:arm64. 288s Preparing to unpack .../09-libxrender1_1%3a0.9.10-1.1build1_arm64.deb ... 288s Unpacking libxrender1:arm64 (1:0.9.10-1.1build1) ... 288s Selecting previously unselected package libcairo2:arm64. 288s Preparing to unpack .../10-libcairo2_1.18.2-2_arm64.deb ... 288s Unpacking libcairo2:arm64 (1.18.2-2) ... 288s Selecting previously unselected package libdatrie1:arm64. 288s Preparing to unpack .../11-libdatrie1_0.2.13-3build1_arm64.deb ... 288s Unpacking libdatrie1:arm64 (0.2.13-3build1) ... 288s Selecting previously unselected package libdeflate0:arm64. 288s Preparing to unpack .../12-libdeflate0_1.23-1_arm64.deb ... 288s Unpacking libdeflate0:arm64 (1.23-1) ... 288s Selecting previously unselected package libgfortran5:arm64. 288s Preparing to unpack .../13-libgfortran5_15-20250222-0ubuntu1_arm64.deb ... 288s Unpacking libgfortran5:arm64 (15-20250222-0ubuntu1) ... 288s Selecting previously unselected package libgomp1:arm64. 288s Preparing to unpack .../14-libgomp1_15-20250222-0ubuntu1_arm64.deb ... 288s Unpacking libgomp1:arm64 (15-20250222-0ubuntu1) ... 288s Selecting previously unselected package libgraphite2-3:arm64. 288s Preparing to unpack .../15-libgraphite2-3_1.3.14-2ubuntu1_arm64.deb ... 288s Unpacking libgraphite2-3:arm64 (1.3.14-2ubuntu1) ... 288s Selecting previously unselected package libharfbuzz0b:arm64. 288s Preparing to unpack .../16-libharfbuzz0b_10.2.0-1_arm64.deb ... 288s Unpacking libharfbuzz0b:arm64 (10.2.0-1) ... 288s Selecting previously unselected package x11-common. 288s Preparing to unpack .../17-x11-common_1%3a7.7+23ubuntu3_all.deb ... 288s Unpacking x11-common (1:7.7+23ubuntu3) ... 289s Selecting previously unselected package libice6:arm64. 289s Preparing to unpack .../18-libice6_2%3a1.1.1-1_arm64.deb ... 289s Unpacking libice6:arm64 (2:1.1.1-1) ... 289s Selecting previously unselected package libjpeg-turbo8:arm64. 289s Preparing to unpack .../19-libjpeg-turbo8_2.1.5-3ubuntu2_arm64.deb ... 289s Unpacking libjpeg-turbo8:arm64 (2.1.5-3ubuntu2) ... 289s Selecting previously unselected package libjpeg8:arm64. 289s Preparing to unpack .../20-libjpeg8_8c-2ubuntu11_arm64.deb ... 289s Unpacking libjpeg8:arm64 (8c-2ubuntu11) ... 289s Selecting previously unselected package liblapack3:arm64. 289s Preparing to unpack .../21-liblapack3_3.12.1-2_arm64.deb ... 289s Unpacking liblapack3:arm64 (3.12.1-2) ... 289s Selecting previously unselected package liblerc4:arm64. 289s Preparing to unpack .../22-liblerc4_4.0.0+ds-5ubuntu1_arm64.deb ... 289s Unpacking liblerc4:arm64 (4.0.0+ds-5ubuntu1) ... 289s Selecting previously unselected package libthai-data. 289s Preparing to unpack .../23-libthai-data_0.1.29-2build1_all.deb ... 289s Unpacking libthai-data (0.1.29-2build1) ... 289s Selecting previously unselected package libthai0:arm64. 289s Preparing to unpack .../24-libthai0_0.1.29-2build1_arm64.deb ... 289s Unpacking libthai0:arm64 (0.1.29-2build1) ... 289s Selecting previously unselected package libpango-1.0-0:arm64. 289s Preparing to unpack .../25-libpango-1.0-0_1.56.2-1_arm64.deb ... 289s Unpacking libpango-1.0-0:arm64 (1.56.2-1) ... 289s Selecting previously unselected package libpangoft2-1.0-0:arm64. 289s Preparing to unpack .../26-libpangoft2-1.0-0_1.56.2-1_arm64.deb ... 289s Unpacking libpangoft2-1.0-0:arm64 (1.56.2-1) ... 289s Selecting previously unselected package libpangocairo-1.0-0:arm64. 289s Preparing to unpack .../27-libpangocairo-1.0-0_1.56.2-1_arm64.deb ... 289s Unpacking libpangocairo-1.0-0:arm64 (1.56.2-1) ... 289s Selecting previously unselected package libpaper2:arm64. 289s Preparing to unpack .../28-libpaper2_2.2.5-0.3_arm64.deb ... 289s Unpacking libpaper2:arm64 (2.2.5-0.3) ... 289s Selecting previously unselected package libpaper-utils. 289s Preparing to unpack .../29-libpaper-utils_2.2.5-0.3_arm64.deb ... 289s Unpacking libpaper-utils (2.2.5-0.3) ... 289s Selecting previously unselected package libsharpyuv0:arm64. 289s Preparing to unpack .../30-libsharpyuv0_1.5.0-0.1_arm64.deb ... 289s Unpacking libsharpyuv0:arm64 (1.5.0-0.1) ... 289s Selecting previously unselected package libsm6:arm64. 289s Preparing to unpack .../31-libsm6_2%3a1.2.4-1_arm64.deb ... 289s Unpacking libsm6:arm64 (2:1.2.4-1) ... 289s Selecting previously unselected package libtcl8.6:arm64. 289s Preparing to unpack .../32-libtcl8.6_8.6.16+dfsg-1_arm64.deb ... 289s Unpacking libtcl8.6:arm64 (8.6.16+dfsg-1) ... 289s Selecting previously unselected package libjbig0:arm64. 289s Preparing to unpack .../33-libjbig0_2.1-6.1ubuntu2_arm64.deb ... 289s Unpacking libjbig0:arm64 (2.1-6.1ubuntu2) ... 289s Selecting previously unselected package libwebp7:arm64. 289s Preparing to unpack .../34-libwebp7_1.5.0-0.1_arm64.deb ... 289s Unpacking libwebp7:arm64 (1.5.0-0.1) ... 289s Selecting previously unselected package libtiff6:arm64. 289s Preparing to unpack .../35-libtiff6_4.5.1+git230720-4ubuntu4_arm64.deb ... 289s Unpacking libtiff6:arm64 (4.5.1+git230720-4ubuntu4) ... 289s Selecting previously unselected package libxft2:arm64. 289s Preparing to unpack .../36-libxft2_2.3.6-1build1_arm64.deb ... 289s Unpacking libxft2:arm64 (2.3.6-1build1) ... 289s Selecting previously unselected package libxss1:arm64. 289s Preparing to unpack .../37-libxss1_1%3a1.2.3-1build3_arm64.deb ... 289s Unpacking libxss1:arm64 (1:1.2.3-1build3) ... 289s Selecting previously unselected package libtk8.6:arm64. 289s Preparing to unpack .../38-libtk8.6_8.6.16-1_arm64.deb ... 289s Unpacking libtk8.6:arm64 (8.6.16-1) ... 290s Selecting previously unselected package libxt6t64:arm64. 290s Preparing to unpack .../39-libxt6t64_1%3a1.2.1-1.2build1_arm64.deb ... 290s Unpacking libxt6t64:arm64 (1:1.2.1-1.2build1) ... 290s Selecting previously unselected package zip. 290s Preparing to unpack .../40-zip_3.0-14ubuntu2_arm64.deb ... 290s Unpacking zip (3.0-14ubuntu2) ... 290s Selecting previously unselected package unzip. 290s Preparing to unpack .../41-unzip_6.0-28ubuntu6_arm64.deb ... 290s Unpacking unzip (6.0-28ubuntu6) ... 290s Selecting previously unselected package xdg-utils. 290s Preparing to unpack .../42-xdg-utils_1.2.1-2ubuntu1_all.deb ... 290s Unpacking xdg-utils (1.2.1-2ubuntu1) ... 290s Selecting previously unselected package r-base-core. 290s Preparing to unpack .../43-r-base-core_4.4.3-1_arm64.deb ... 290s Unpacking r-base-core (4.4.3-1) ... 290s Selecting previously unselected package r-cran-lattice. 290s Preparing to unpack .../44-r-cran-lattice_0.22-6-1_arm64.deb ... 290s Unpacking r-cran-lattice (0.22-6-1) ... 290s Selecting previously unselected package r-cran-matrix. 290s Preparing to unpack .../45-r-cran-matrix_1.7-3-1_arm64.deb ... 290s Unpacking r-cran-matrix (1.7-3-1) ... 290s Selecting previously unselected package r-cran-expm. 290s Preparing to unpack .../46-r-cran-expm_1.0-0-1_arm64.deb ... 290s Unpacking r-cran-expm (1.0-0-1) ... 290s Selecting previously unselected package r-cran-gmp. 290s Preparing to unpack .../47-r-cran-gmp_0.7-5-1_arm64.deb ... 290s Unpacking r-cran-gmp (0.7-5-1) ... 290s Selecting previously unselected package r-cran-rcolorbrewer. 290s Preparing to unpack .../48-r-cran-rcolorbrewer_1.1-3-1build1_all.deb ... 290s Unpacking r-cran-rcolorbrewer (1.1-3-1build1) ... 290s Selecting previously unselected package r-cran-rmpfr. 290s Preparing to unpack .../49-r-cran-rmpfr_0.9-5-1_arm64.deb ... 290s Unpacking r-cran-rmpfr (0.9-5-1) ... 290s Selecting previously unselected package r-cran-sfsmisc. 290s Preparing to unpack .../50-r-cran-sfsmisc_1.1-20-1_all.deb ... 290s Unpacking r-cran-sfsmisc (1.1-20-1) ... 291s Setting up libgraphite2-3:arm64 (1.3.14-2ubuntu1) ... 291s Setting up libpixman-1-0:arm64 (0.44.0-3) ... 291s Setting up libsharpyuv0:arm64 (1.5.0-0.1) ... 291s Setting up liblerc4:arm64 (4.0.0+ds-5ubuntu1) ... 291s Setting up libxrender1:arm64 (1:0.9.10-1.1build1) ... 291s Setting up libdatrie1:arm64 (0.2.13-3build1) ... 291s Setting up libxcb-render0:arm64 (1.17.0-2) ... 291s Setting up unzip (6.0-28ubuntu6) ... 291s Setting up x11-common (1:7.7+23ubuntu3) ... 291s Setting up libdeflate0:arm64 (1.23-1) ... 291s Setting up libxcb-shm0:arm64 (1.17.0-2) ... 291s Setting up libgomp1:arm64 (15-20250222-0ubuntu1) ... 291s Setting up libjbig0:arm64 (2.1-6.1ubuntu2) ... 291s Setting up zip (3.0-14ubuntu2) ... 291s Setting up libblas3:arm64 (3.12.1-2) ... 291s update-alternatives: using /usr/lib/aarch64-linux-gnu/blas/libblas.so.3 to provide /usr/lib/aarch64-linux-gnu/libblas.so.3 (libblas.so.3-aarch64-linux-gnu) in auto mode 291s Setting up fonts-dejavu-mono (2.37-8) ... 291s Setting up libtcl8.6:arm64 (8.6.16+dfsg-1) ... 291s Setting up fonts-dejavu-core (2.37-8) ... 291s Setting up libjpeg-turbo8:arm64 (2.1.5-3ubuntu2) ... 291s Setting up libgfortran5:arm64 (15-20250222-0ubuntu1) ... 291s Setting up libwebp7:arm64 (1.5.0-0.1) ... 291s Setting up libharfbuzz0b:arm64 (10.2.0-1) ... 291s Setting up libthai-data (0.1.29-2build1) ... 291s Setting up libxss1:arm64 (1:1.2.3-1build3) ... 291s Setting up libpaper2:arm64 (2.2.5-0.3) ... 291s Setting up xdg-utils (1.2.1-2ubuntu1) ... 291s update-alternatives: using /usr/bin/xdg-open to provide /usr/bin/open (open) in auto mode 291s Setting up libjpeg8:arm64 (8c-2ubuntu11) ... 291s Setting up libice6:arm64 (2:1.1.1-1) ... 291s Setting up liblapack3:arm64 (3.12.1-2) ... 291s update-alternatives: using /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/aarch64-linux-gnu/liblapack.so.3 (liblapack.so.3-aarch64-linux-gnu) in auto mode 291s Setting up fontconfig-config (2.15.0-2ubuntu1) ... 291s Setting up libpaper-utils (2.2.5-0.3) ... 291s Setting up libthai0:arm64 (0.1.29-2build1) ... 291s Setting up libtiff6:arm64 (4.5.1+git230720-4ubuntu4) ... 291s Setting up libfontconfig1:arm64 (2.15.0-2ubuntu1) ... 291s Setting up libsm6:arm64 (2:1.2.4-1) ... 291s Setting up fontconfig (2.15.0-2ubuntu1) ... 293s Regenerating fonts cache... done. 293s Setting up libxft2:arm64 (2.3.6-1build1) ... 293s Setting up libtk8.6:arm64 (8.6.16-1) ... 293s Setting up libpango-1.0-0:arm64 (1.56.2-1) ... 293s Setting up libcairo2:arm64 (1.18.2-2) ... 293s Setting up libxt6t64:arm64 (1:1.2.1-1.2build1) ... 293s Setting up libpangoft2-1.0-0:arm64 (1.56.2-1) ... 293s Setting up libpangocairo-1.0-0:arm64 (1.56.2-1) ... 293s Setting up r-base-core (4.4.3-1) ... 294s Creating config file /etc/R/Renviron with new version 294s Setting up r-cran-lattice (0.22-6-1) ... 294s Setting up r-cran-gmp (0.7-5-1) ... 294s Setting up r-cran-sfsmisc (1.1-20-1) ... 294s Setting up r-cran-rcolorbrewer (1.1-3-1build1) ... 294s Setting up r-cran-matrix (1.7-3-1) ... 294s Setting up r-cran-rmpfr (0.9-5-1) ... 294s Setting up r-cran-expm (1.0-0-1) ... 294s Processing triggers for install-info (7.1.1-1) ... 294s Processing triggers for libc-bin (2.41-1ubuntu2) ... 294s Processing triggers for man-db (2.13.0-1) ... 296s autopkgtest [15:30:18]: test run-unit-test: [----------------------- 297s 297s R version 4.4.3 (2025-02-28) -- "Trophy Case" 297s Copyright (C) 2025 The R Foundation for Statistical Computing 297s Platform: aarch64-unknown-linux-gnu 297s 297s R is free software and comes with ABSOLUTELY NO WARRANTY. 297s You are welcome to redistribute it under certain conditions. 297s Type 'license()' or 'licence()' for distribution details. 297s 297s R is a collaborative project with many contributors. 297s Type 'contributors()' for more information and 297s 'citation()' on how to cite R or R packages in publications. 297s 297s Type 'demo()' for some demos, 'help()' for on-line help, or 297s 'help.start()' for an HTML browser interface to help. 297s Type 'q()' to quit R. 297s 297s > library(expm) 297s Loading required package: Matrix 298s > 298s > source(system.file("test-tools.R", package= "expm"), keep.source=FALSE)# relErr() 298s 298s Attaching package: ‘expm’ 298s 298s The following object is masked from ‘package:Matrix’: 298s 298s expm 298s 298s Loading required package: tools 298s > 298s > set.seed(101) 298s > for(n in c(1:5, 10:11, if(doExtras) 100:101 else 25)) { 298s + cat("n = ",n,"\n-----\n") 298s + for(i in seq_len(if(doExtras)10 else 3)) { 298s + A <- matrix(round(10*rnorm(n^2))/4, n,n) 298s + E <- matrix(rnorm(n^2, sd = 1e-3), n,n) 298s + F1 <- expmFrechet(A, E) 298s + F2 <- expmFrechet(A, E, "block") 298s + if(i == 1 && n < 9) print(F1) 298s + stopifnot(all.equal(F1, F2, tol = 6e-15 * n)) 298s + cat(sprintf("%5.2f ", relErr(F1 $ L, F2 $ L) * 2^52)) 298s + } 298s + cat(" * eps_C \n") 298s + } 298s n = 1 298s ----- 298s $expm 298s [,1] 298s [1,] 0.4723666 298s 298s $Lexpm 298s [,1] 298s [1,] 0.0002609645 298s 298s 0.00 0.00 0.00 * eps_C 298s n = 2 298s ----- 298s $expm 298s [,1] [,2] 298s [1,] 3.7943192 3.9860952 298s [2,] -0.4428995 0.2511234 298s 298s $Lexpm 298s [,1] [,2] 298s [1,] -0.000196749 0.0005570041 298s [2,] -0.001188989 -0.0019747694 298s 298s 1.22 2.16 1.08 * eps_C 298s n = 3 298s ----- 298s $expm 298s [,1] [,2] [,3] 298s [1,] -13.234401 -7.815106 -5.911481 298s [2,] 3.475001 -14.396109 -2.922287 298s [3,] -4.792555 -3.230410 -2.237135 298s 298s $Lexpm 298s [,1] [,2] [,3] 298s [1,] -0.006244373 0.03825617 0.006773883 298s [2,] -0.009314389 -0.01048467 -0.005528605 298s [3,] -0.003071235 0.01362774 0.002137511 298s 298s 4.24 5.40 9.86 * eps_C 298s n = 4 298s ----- 298s $expm 298s [,1] [,2] [,3] [,4] 298s [1,] 0.2707319 -0.1626405 -2.119235 -0.07861206 298s [2,] 2.0900646 -0.7912464 -14.169394 -0.17449996 298s [3,] 6.3895316 12.2833412 -18.789145 6.32147099 298s [4,] -2.2731287 -5.9125055 4.417767 -2.96095147 298s 298s $Lexpm 298s [,1] [,2] [,3] [,4] 298s [1,] 7.677032e-05 0.001682315 -0.0008184674 0.0009526274 298s [2,] -1.662466e-03 0.009155436 0.0057316462 0.0050790835 298s [3,] -4.184527e-03 -0.001231147 0.0132157465 0.0025368226 298s [4,] -4.704290e-04 0.000236295 0.0019512119 -0.0013450671 298s 298s 4.42 8.78 0.71 * eps_C 298s n = 5 298s ----- 298s $expm 298s [,1] [,2] [,3] [,4] [,5] 298s [1,] 28.89025 -7.887859 -5.470599 0.5944806 9.342582 298s [2,] 13.49317 -13.253465 34.703223 31.9553150 -3.493428 298s [3,] 77.39341 -41.002709 78.782028 79.2962299 5.522557 298s [4,] 32.49178 -16.213884 20.464336 23.6511224 4.510920 298s [5,] -41.22584 20.972736 -29.288624 -33.2428425 -5.776531 298s 298s $Lexpm 298s [,1] [,2] [,3] [,4] [,5] 298s [1,] 0.056099069 -0.036816360 0.09881220 0.086689105 -0.0230892952 298s [2,] -0.022878412 0.028215505 -0.04468039 -0.041094058 0.0005738551 298s [3,] 0.047797873 -0.004093659 0.09600680 0.079920949 -0.0371636943 298s [4,] 0.022749004 -0.006615176 0.04445098 0.036856490 -0.0189132368 298s [5,] 0.004190808 -0.010861707 -0.01759342 -0.008662979 0.0249103378 298s 298s 2.42 2.05 1.94 * eps_C 298s n = 10 298s ----- 298s 2.75 5.08 2.23 * eps_C 298s n = 11 298s ----- 298s 3.40 2.25 3.69 * eps_C 298s n = 25 298s ----- 298s 4.85 4.33 3.25 * eps_C 298s > 298s > cat('Time elapsed: ', proc.time(), '\n') # for "statistical reasons" 298s Time elapsed: 1.182 0.127 1.313 0.001 0.004 298s > 298s 298s R version 4.4.3 (2025-02-28) -- "Trophy Case" 298s Copyright (C) 2025 The R Foundation for Statistical Computing 298s Platform: aarch64-unknown-linux-gnu 298s 298s R is free software and comes with ABSOLUTELY NO WARRANTY. 298s You are welcome to redistribute it under certain conditions. 298s Type 'license()' or 'licence()' for distribution details. 298s 298s R is a collaborative project with many contributors. 298s Type 'contributors()' for more information and 298s 'citation()' on how to cite R or R packages in publications. 298s 298s Type 'demo()' for some demos, 'help()' for on-line help, or 298s 'help.start()' for an HTML browser interface to help. 298s Type 'q()' to quit R. 298s 298s > library(expm) 298s Loading required package: Matrix 299s 299s Attaching package: ‘expm’ 299s 299s > source(system.file("test-tools.R", package= "expm"), keep.source=FALSE)## -> assertError()... 299s The following object is masked from ‘package:Matrix’: 299s 299s expm 299s 299s Loading required package: tools 299s > 299s > ## A matrix with 'Inf' 299s > mI <- rbind(0, c(-Inf, Inf, 0, 0), 0, 0) 299s > bal3 <- 299s + list(dB = dgebal(mI, "B"), # = default 299s + dP = dgebal(mI, "P"), 299s + dN = dgebal(mI, "N")) 299s > str(bal3) 299s Warning messages: 299s 1: In dgebal(mI, "B") : 'dgebal' is deprecated. 299s Use 'balance' instead. 299s See help("Deprecated") 299s 2: In dgebal(mI, "P") : 'dgebal' is deprecated. 299s Use 'balance' instead. 299s See help("Deprecated") 299s 3: In dgebal(mI, "N") : 'dgebal' is deprecated. 299s Use 'balance' instead. 299s See help("Deprecated") 299s List of 3 299s $ dB:List of 4 299s ..$ z : num [1:4, 1:4] Inf 0 0 0 -Inf ... 299s ..$ scale: num [1:4] 1 1 3 4 299s ..$ i1 : int 1 299s ..$ i2 : int 1 299s $ dP:List of 4 299s ..$ z : num [1:4, 1:4] Inf 0 0 0 -Inf ... 299s ..$ scale: num [1:4] 1 1 3 4 299s ..$ i1 : int 1 299s ..$ i2 : int 1 299s $ dN:List of 4 299s ..$ z : num [1:4, 1:4] 0 -Inf 0 0 0 ... 299s ..$ scale: num [1:4] 1 1 1 1 299s ..$ i1 : int 1 299s ..$ i2 : int 4 299s > stopifnot(identical(mI, bal3$dN$z), 299s + with(bal3, all.equal(dB, dP, tol=1e-14)), 299s + all.equal(bal3$dB$z, rbind(c(Inf,-Inf,0,0), 0,0,0), tol=1e-14), 299s + all.equal(bal3$dB$scale, c(1,1,3,4))) 299s > assertError(dgebal(mI, "S"), verbose=TRUE)# gave infinite loop 299s > 299s > 299s > 299s > ## Compare the two different "balance" pre-conditioning versions in Ward77: 299s > set.seed(1) 299s > mList <- lapply(integer(100), function(...) rSpMatrix(20, nnz=80)) 299s > re20 <- sapply(mList, function(M) 299s + relErr(expm(M, precond = "2bal"), 299s + expm(M, precond = "1bal"))) 299s Asserted error: R_dgebal(*, type="S"): Infinite matrix entry 299s > re20 ## ahh.: zero or ~ 1e-13 ... good 299s [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 299s [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 299s [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 299s > table(re20 == 0) 299s 299s TRUE 299s 100 299s > summary(re20[re20 != 0]) 299s Min. 1st Qu. Median Mean 3rd Qu. Max. 299s 299s > ## Pentium M (ubuntu) 299s > ## Min. 1st Qu. Median Mean 3rd Qu. Max. 299s > ## 2.593e-14 8.703e-14 1.282e-13 2.434e-13 4.177e-13 6.295e-13 299s > 299s > demo(balanceTst) #-> the function definition and the first few examples 299s 299s 299s demo(balanceTst) 299s ---- ~~~~~~~~~~ 299s 299s > balanceTst <- function(A) { 299s + 299s + ## Purpose: Consistency checking of balance() {was "dgebal()"} 299s + ## ---------------------------------------------------------------------- 299s + ## Arguments: a square matrix 299s + ## ---------------------------------------------------------------------- 299s + ## Author: Martin Maechler, 20 Feb 2008 and on 299s + 299s + n <- dim(A)[1] 299s + ## do *the* three calls and look at result 299s + P <- balance(A, "P") 299s + 299s + doPerm <- function(A, pp, i1, i2) { 299s + stopifnot(length(pp) == n, dim(A) == c(n,n), 299s + 1 <= i1, i1 <= i2, i2 <= n) 299s + A. <- A 299s + if(i2 < n) { ## The upper part 299s + for(i in n:(i2+1)) { # 'p2' in *reverse* order 299s + ## swap i <-> pp[i] both rows and columns 299s + tt <- A.[,i]; A.[,i] <- A.[,pp[i]]; A.[,pp[i]] <- tt 299s + tt <- A.[i,]; A.[i,] <- A.[pp[i],]; A.[pp[i],] <- tt 299s + } 299s + } 299s + if(i1 > 1) { ## The lower part 299s + for(i in 1:(i1-1)) { # 'p1' in *forward* order 299s + tt <- A.[,i]; A.[,i] <- A.[,pp[i]]; A.[,pp[i]] <- tt 299s + tt <- A.[i,]; A.[i,] <- A.[pp[i],]; A.[pp[i],] <- tt 299s + } 299s + } 299s + A. 299s + } 299s + 299s + checkPerm <- function(P, orig.A) { 299s + didPerm <- ((leftP <- (i1 <- P$i1) != 1L) | 299s + (rightP <- (i2 <- P$i2) != n)) 299s + if(didPerm) { ## *had* permutation -- now check my idea about it 299s + pp <- as.integer(P$scale) 299s + ## Permute A to become P$z : 299s + A. <- doPerm(orig.A, pp = pp, i1=i1, i2=i2) 299s + stopifnot(isTRUE(all.equal(A., P$z, tolerance = 1e-15))) 299s + 299s + ## Now the reverse: Use pp[] and permute A. "back to A": 299s + if(leftP) { ## The lower part 299s + for(i in (i1-1):1) { # 'p1' in *reverse* order 299s + tt <- A.[,i]; A.[,i] <- A.[,pp[i]]; A.[,pp[i]] <- tt 299s + tt <- A.[i,]; A.[i,] <- A.[pp[i],]; A.[pp[i],] <- tt 299s + } 299s + } 299s + if(rightP) { ## The upper part 299s + for(i in (i2+1):n) { # 'p2' in *forward* order 299s + ## swap i <-> pp[i] both rows and columns 299s + tt <- A.[,i]; A.[,i] <- A.[,pp[i]]; A.[,pp[i]] <- tt 299s + tt <- A.[i,]; A.[i,] <- A.[pp[i],]; A.[pp[i],] <- tt 299s + } 299s + } 299s + stopifnot(isTRUE(all.equal(A., orig.A, tolerance = 1e-15))) 299s + } 299s + } 299s + checkPerm(P, orig.A = A) 299s + 299s + S <- balance(P$z, "S")# "S" starting from result of "P" 299s + stopifnot(S$i1 == 1, S$i2 == n) 299s + 299s + ## Now check the scaling 299s + checkScal <- function (d, A1, A2) { 299s + stopifnot(length(d) == n, dim(A1) == dim(A2), dim(A2) == c(n,n)) 299s + 299s + ## A.scaled <- diag(1/d, n) \%*\% A1 \%*\% diag(d, n) 299s + ## more efficiently: 299s + A.scaled <- A1 * (rep(d, each = n) / d) 299s + stopifnot(isTRUE(all.equal(A2, A.scaled, tolerance = 1e-15))) 299s + ## Check the reverse: 299s + S.rescaled <- A2 * (d * rep(1/d, each = n)) 299s + stopifnot(isTRUE(all.equal(A1, S.rescaled, tolerance = 1e-15))) 299s + } 299s + checkScal(d = S$scale, A1 = P$z, A2 = S$z) 299s + 299s + B <- balance(A, "B")# "B" : B[oth] 299s + stopifnot(P$i1 == B$i1, P$i2 == B$i2) 299s + ## now check *both* permutation and scaling 299s + 299s + A.perm <- doPerm(A, pp = as.integer(B$scale), i1=B$i1, i2=B$i2) 299s + ## checkPerm(B, orig.A = A) 299s + 299s + dB <- B$scale 299s + dB[c(if(B$i1 > 1) 1:(B$i1-1), 299s + if(B$i2 < n) (B$i2+1):n)] <- 1 299s + checkScal(d = dB, A1 = A.perm, A2 = B$z) 299s + 299s + ## return 299s + list(P = P, S = S, B = B, Sz.eq.Bz = isTRUE(all.equal(S$z, B$z))) 299s + } 299s 299s > m4. <- rbind(c(-1,-2, 0, 0), 299s + c( 0, 0,10,11), 299s + c( 0, 0,12, 0), 299s + c( 0,13, 0, 0)) 299s 299s > op <- options(str = strOptions(vec.len = 12)) 299s 299s > str(b4. <- balanceTst(m4.)) 300s List of 4 300s $ P :List of 4 300s ..$ z : num [1:4, 1:4] -1 0 0 0 -2 0 13 0 0 11 0 0 0 10 0 12 300s ..$ scale: num [1:4] 1 1 1 3 300s ..$ i1 : int 2 300s ..$ i2 : int 3 300s $ S :List of 4 300s ..$ z : num [1:4, 1:4] -1 0 0 0 -2 0 13 0 0 11 0 0 0 10 0 12 300s ..$ scale: num [1:4] 1 1 1 1 300s ..$ i1 : int 1 300s ..$ i2 : int 4 300s $ B :List of 4 300s ..$ z : num [1:4, 1:4] -1 0 0 0 -2 0 13 0 0 11 0 0 0 10 0 12 300s ..$ scale: num [1:4] 1 1 1 3 300s ..$ i1 : int 2 300s ..$ i2 : int 3 300s $ Sz.eq.Bz: logi TRUE 300s 300s > with(b4., all.equal(P, B)) # TRUE (everywhere?) 300s [1] TRUE 300s 300s > ## better (?) example 300s > (m <- matrix(c(0,-1,0,-2,10, rep(0,11)), 4,4)) 300s [,1] [,2] [,3] [,4] 300s [1,] 0 10 0 0 300s [2,] -1 0 0 0 300s [3,] 0 0 0 0 300s [4,] -2 0 0 0 300s 300s > str(ba <- balanceTst(m)) 300s List of 4 300s $ P :List of 4 300s ..$ z : num [1:4, 1:4] 0 0 0 0 0 0 10 0 -2 -1 0 0 0 0 0 0 300s ..$ scale: num [1:4] 3 1 1 3 300s ..$ i1 : int 2 300s ..$ i2 : int 3 300s $ S :List of 4 300s ..$ z : num [1:4, 1:4] 0 0 0 0 0 0 2.5 0 -2 -4 0 0 0 0 0 0 300s ..$ scale: num [1:4] 1 0.25 1 1 300s ..$ i1 : int 1 300s ..$ i2 : int 4 300s $ B :List of 4 300s ..$ z : num [1:4, 1:4] 0 0 0 0 0 0 2.5 0 -2 -4 0 0 0 0 0 0 300s ..$ scale: num [1:4] 3 0.25 1 3 300s ..$ i1 : int 2 300s ..$ i2 : int 3 300s $ Sz.eq.Bz: logi TRUE 300s 300s > (eq <- with(ba, all.equal(S$z, B$z))) # TRUE now (everywhere?) 300s [1] TRUE 300s 300s > ba$Sz.eq.Bz # ditto 300s [1] TRUE 300s 300s > ## a non-empty ``less-balanced'' example --- 300s > 300s > m4 <- matrix(outer(2^(0:7),c(-1,1)), 4,4) 300s 300s > m4[lower.tri(m4)] <- 0 #--> upper triangular ==> will have many permutations 300s 300s > ## now permute it; so balance() will find the permutation 300s > p <- c(4,2:1,3); m4 <- m4[p,p] 300s 300s > m4 300s [,1] [,2] [,3] [,4] 300s [1,] 128 0 0 0 300s [2,] 32 -32 0 2 300s [3,] 16 -16 -1 1 300s [4,] 64 0 0 4 300s 300s > str(dm4 <- balanceTst(m4)) # much permutation! i1 = i2 = 1 ! 300s List of 4 300s $ P :List of 4 300s ..$ z : num [1:4, 1:4] -1 0 0 0 -16 -32 0 0 1 2 4 0 16 32 64 128 300s ..$ scale: num [1:4] 1 2 1 1 300s ..$ i1 : int 1 300s ..$ i2 : int 1 300s $ S :List of 4 300s ..$ z : num [1:4, 1:4] -1 0 0 0 -1 -32 0 0 0.25 8 4 0 1 32 16 128 300s ..$ scale: num [1:4] 16 1 4 1 300s ..$ i1 : int 1 300s ..$ i2 : int 4 300s $ B :List of 4 300s ..$ z : num [1:4, 1:4] -1 0 0 0 -16 -32 0 0 1 2 4 0 16 32 64 128 300s ..$ scale: num [1:4] 1 2 1 1 300s ..$ i1 : int 1 300s ..$ i2 : int 1 300s $ Sz.eq.Bz: logi FALSE 300s 300s > ##----------- Complex examples 300s > zba4 <- balanceTst(m4 + 3i * m4) 300s 300s > str(zba4) 300s List of 4 300s $ P :List of 4 300s ..$ z : cplx [1:4, 1:4] -1-3i 0+0i 0+0i 0+0i -16-48i -32-96i 0+0i 0+0i 1+3i ... 300s ..$ scale: num [1:4] 1 2 1 1 300s ..$ i1 : int 1 300s ..$ i2 : int 1 300s $ S :List of 4 300s ..$ 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 ... 300s ..$ scale: num [1:4] 16 1 4 1 300s ..$ i1 : int 1 300s ..$ i2 : int 4 300s $ B :List of 4 300s ..$ z : cplx [1:4, 1:4] -1-3i 0+0i 0+0i 0+0i -16-48i -32-96i 0+0i 0+0i 1+3i ... 300s ..$ scale: num [1:4] 1 2 1 1 300s ..$ i1 : int 1 300s ..$ i2 : int 1 300s $ Sz.eq.Bz: logi FALSE 300s 300s > zba <- balanceTst(m*(1 + 1i)) 300s 300s > str(zba) 300s List of 4 300s $ P :List of 4 300s ..$ z : cplx [1:4, 1:4] 0+0i 0+0i 0+0i 0+0i 0+0i 0+0i 10+10i 0+0i -2-2i ... 300s ..$ scale: num [1:4] 3 1 1 3 300s ..$ i1 : int 2 300s ..$ i2 : int 3 300s $ S :List of 4 300s ..$ 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 ... 300s ..$ scale: num [1:4] 1 0.25 1 1 300s ..$ i1 : int 1 300s ..$ i2 : int 4 300s $ B :List of 4 300s ..$ 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 ... 300s ..$ scale: num [1:4] 3 0.25 1 3 300s ..$ i1 : int 2 300s ..$ i2 : int 3 300s $ Sz.eq.Bz: logi TRUE 300s 300s > stopifnot(exprs = { 300s + all.equal(ba$ S$z, Re(zba$ S$z)) 300s + all.equal(ba$ S$z, Im(zba$ S$z)) 300s + all.equal(dm4$ S$z, Re(zba4$ S$z)) 300s + all.equal(dm4$ S$z * 3, Im(zba4$ S$z)) 300s + }) 300s 300s > options(op) # revert 300s > ## ========== 300s > 300s > dm4. <- dgebal(m4) 300s > storage.mode(m4) <- "integer" 300s > stopifnot(identical(dm4., dgebal(m4))) 300s > 300s > expm(m) 300s Warning message: 300s In dgebal(m4) : 'dgebal' is deprecated. 300s Use 'balance' instead. 300s See help("Deprecated") 300s Warning message: 300s In dgebal(m4) : 'dgebal' is deprecated. 300s Use 'balance' instead. 300s See help("Deprecated") 300s [,1] [,2] [,3] [,4] 300s [1,] -0.999786073 -0.06540707 0 0 300s [2,] 0.006540707 -0.99978607 0 0 300s [3,] 0.000000000 0.00000000 1 0 300s [4,] 0.013081414 -3.99957215 0 1 300s > expm(m,"Pade") ## are different indeed {when bug still existed} 300s [,1] [,2] [,3] [,4] 300s [1,] -0.999786073 -0.06540707 0 0 300s [2,] 0.006540707 -0.99978607 0 0 300s [3,] 0.000000000 0.00000000 1 0 300s [4,] 0.013081414 -3.99957215 0 1 300s attr(,"accuracy") 300s [1] 1.160917e-14 300s > expm(m,"R_Pade")# same as Pade 300s [,1] [,2] [,3] [,4] 300s [1,] -0.999786073 -0.06540707 0 0 300s [2,] 0.006540707 -0.99978607 0 0 300s [3,] 0.000000000 0.00000000 1 0 300s [4,] 0.013081414 -3.99957215 0 1 300s > 300s > 300s > ## a non-empty ``non-balanced'' example --- 300s > 300s > expm.t.identity(m4, "Ward") 300s [1] TRUE 300s > 300s > m6 <- zeroTrace(matrix(outer(2^(-8:9),c(-1,1)), 6,6)); m6 300s [,1] [,2] [,3] [,4] [,5] [,6] 300s [1,] -75.2584635 -0.25000 -16.0000 0.00390625 0.25000 16.0000 300s [2,] -0.0078125 -75.75456 -32.0000 0.00781250 0.50000 32.0000 300s [3,] -0.0156250 -1.00000 -139.2546 0.01562500 1.00000 64.0000 300s [4,] -0.0312500 -2.00000 -128.0000 -75.22330729 2.00000 128.0000 300s [5,] -0.0625000 -4.00000 -256.0000 0.06250000 -71.25456 256.0000 300s [6,] -0.1250000 -8.00000 -512.0000 0.12500000 8.00000 436.7454 300s > m6[lower.tri(m6)] <- 0 ## plus one non-zero 300s > m6[4,2] <- 77 300s > p <- c(6,4,5,2:1,3); m6 <- m6[p,p] 300s > expm.t.identity(m6, "Ward") ## difference; indeed 300s [1] TRUE 300s > expm(m6) # is very different from 300s [,1] [,2] [,3] [,4] [,5] 300s [1,] 4.743903e+189 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 300s [2,] 1.235301e+189 2.158311e-33 7.038631e-32 1.285266e-31 0.000000e+00 300s [3,] 2.390628e+189 0.000000e+00 1.133807e-31 0.000000e+00 0.000000e+00 300s [4,] 2.653829e+188 1.627057e-37 7.493870e-34 1.271561e-33 0.000000e+00 300s [5,] 1.326905e+188 8.096068e-38 3.743330e-34 -4.016897e-34 2.068543e-33 300s [6,] 5.312842e+188 5.266261e-37 1.683517e-33 3.098706e-35 0.000000e+00 300s [,6] 300s [1,] 0.000000e+00 300s [2,] -6.346149e-32 300s [3,] 0.000000e+00 300s [4,] -6.406872e-34 300s [5,] -3.187638e-34 300s [6,] -1.529642e-35 300s > expm(m6,"R_Pade") 300s [,1] [,2] [,3] [,4] [,5] 300s [1,] 4.743903e+189 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 300s [2,] 1.235301e+189 2.158311e-33 7.038631e-32 1.285266e-31 0.000000e+00 300s [3,] 2.390628e+189 0.000000e+00 1.133807e-31 0.000000e+00 0.000000e+00 300s [4,] 2.653829e+188 1.627057e-37 7.493870e-34 1.271561e-33 0.000000e+00 300s [5,] 1.326905e+188 8.096068e-38 3.743330e-34 -4.016897e-34 2.068543e-33 300s [6,] 5.312842e+188 5.266261e-37 1.683517e-33 3.098706e-35 0.000000e+00 300s [,6] 300s [1,] 0.000000e+00 300s [2,] -6.346149e-32 300s [3,] 0.000000e+00 300s [4,] -6.406872e-34 300s [5,] -3.187638e-34 300s [6,] -1.529642e-35 300s > 300s > str(dm6 <- balanceTst(m6)) 300s List of 4 300s $ P :List of 4 300s ..$ z : num [1:6, 1:6] -75.3 0 0 0 0 ... 300s ..$ scale: num [1:6] 3 1 1 1 3 1 300s ..$ i1 : int 2 300s ..$ i2 : int 4 300s $ S :List of 4 300s ..$ z : num [1:6, 1:6] -75.3 0 0 0 0 ... 300s ..$ scale: num [1:6] 1 1 1 1 2 1 300s ..$ i1 : int 1 300s ..$ i2 : int 6 300s $ B :List of 4 300s ..$ z : num [1:6, 1:6] -75.3 0 0 0 0 ... 300s ..$ scale: num [1:6] 3 1 1 1 3 1 300s ..$ i1 : int 2 300s ..$ i2 : int 4 300s $ Sz.eq.Bz: logi FALSE 300s > ## Now, that's interesting: 300s > ## 300s > ## 1. 'S' scales *more* (2 .. 5) than just (2:4 == i1:i2) ! 300s > ## 300s > ## 2. 'B' has quite different scaling and it does (must!) obey rule 300s > ## scale i1:i2 only 300s > ## 300s > ## 3. 'B'(oth) is better than "P" and "S" separately: 300s > ## 300s > kappa(eigen(m6)$vectors)# 597.5588 300s [1] 597.5588 300s > kappa(eigen(dm6$P$z)$vectors)# 597.5588 300s [1] 597.5588 300s > kappa(eigen(dm6$S$z)$vectors)# 42.58396 300s [1] 621.5746 300s > kappa(eigen(dm6$B$z)$vectors)# 22.20266 300s [1] 597.5588 300s > 300s > 300s > ## An n=17 example where octave's expm() is wrong too 300s > m17 <- matrix(c(10,0, 0, 2, 3,-1, 0, 0, 0, 0, 0, 4, 0, 5, 0, 0,-2, 300s + 0, 0, 0, 0,-3, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 7, 0, 300s + 0, 0,10, 0, 0,-4, 9, 0, 0, 0,-5, 0,-6, 0, 0, 0, 0, 300s + 0, 0,-7, 0, 0, 0, 0, 0, 0,10, 0, 0, 0, 0, 0,11, 0, 300s + 0, 0, 0, 0, 0, 0,12, 0, 0, 0, 0, 0,-8, 0, 0, 0, 0, 300s + 0, 0,-9, 0, 0, 0, 0, 0, 0,-10,0,13,14,-11,-12,-13, 0, 300s + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 300s + 0, 0, 0, 0, 0, 0, 0,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 300s + 0, 0, 0, 0, 0,-14,16,0,-10,0,17, 0, 0, 0, 0, 0, 0, 300s + 0, 0,-16,0, 0,18,19, 0, 0, 0, 0, 0, 0, 0,20, 0, 21, 300s + 22,0, 0, 0, 0, 0,-17,0, 0, 0,-10,-19,-20,0,0,0, 0, 300s + 0,-21,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 300s + 0, 0, 0,23,24, 0,25,26, 0, 0,27,-22,0,28,-23,0,-24, 300s + 0,-25,0,29, 0, 0, 0, 0, 0, 0, 0,30,31, 0, 0, 0, 0, 300s + 0, 0,-26,32,0, 0, 0, 0, 0,-27,0,33,34, 0, 0, 0, 0, 300s + 0,-28,-29,0,0, 0,35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 300s + 0, 0, 0, 0, 0, 0,36,37, 0, 0, 0, 0, 0, 0, 0, 0,-10), 300s + 17, 17) 300s > str(dm17 <- balanceTst(m17)) 300s List of 4 300s $ P :List of 4 300s ..$ z : num [1:17, 1:17] 0 0 0 0 0 0 0 0 0 0 ... 300s ..$ scale: num [1:17] 7 8 9 1 1 1 1 1 1 1 ... 300s ..$ i1 : int 4 300s ..$ i2 : int 16 300s $ S :List of 4 300s ..$ z : num [1:17, 1:17] 0 0 0 0 0 0 0 0 0 0 ... 300s ..$ scale: num [1:17] 1 4 1 2 1 1 1 2 2 1 ... 300s ..$ i1 : int 1 300s ..$ i2 : int 17 300s $ B :List of 4 300s ..$ z : num [1:17, 1:17] 0 0 0 0 0 0 0 0 0 0 ... 300s ..$ scale: num [1:17] 7 8 9 2 2 1 1 2 2 1 ... 300s ..$ i1 : int 4 300s ..$ i2 : int 16 300s $ Sz.eq.Bz: logi FALSE 300s > sapply(dm17[1:3], `[[`, "scale") 300s P S B 300s [1,] 7 1.0 7 300s [2,] 8 4.0 8 300s [3,] 9 1.0 9 300s [4,] 1 2.0 2 300s [5,] 1 1.0 2 300s [6,] 1 1.0 1 300s [7,] 1 1.0 1 300s [8,] 1 2.0 2 300s [9,] 1 2.0 2 300s [10,] 1 1.0 1 300s [11,] 1 1.0 1 300s [12,] 1 2.0 2 300s [13,] 1 1.0 1 300s [14,] 1 1.0 1 300s [15,] 1 1.0 1 300s [16,] 1 1.0 1 300s [17,] 9 0.5 9 300s > 300s > ## The balancing was really rather harmful -- cond(V) *not* improved: 300s > condX <- function(x) kappa(x, exact=TRUE) 300s > condX(eigen(m17)$vectors)# 8.9e16 300s [1] 1.320065e+17 300s > condX(eigen(dm17$P$z)$vectors)# 1.37e17 300s [1] 1.36865e+17 300s > condX(eigen(dm17$S$z)$vectors)# 1.44e17 300s [1] 6.451363e+16 300s > condX(eigen(dm17$B$z)$vectors)# 1.43e17 (very slightly smaller) 300s [1] 1.437207e+17 300s > 300s 300s R version 4.4.3 (2025-02-28) -- "Trophy Case" 300s Copyright (C) 2025 The R Foundation for Statistical Computing 300s Platform: aarch64-unknown-linux-gnu 300s 300s R is free software and comes with ABSOLUTELY NO WARRANTY. 300s You are welcome to redistribute it under certain conditions. 300s Type 'license()' or 'licence()' for distribution details. 300s 300s R is a collaborative project with many contributors. 300s Type 'contributors()' for more information and 300s 'citation()' on how to cite R or R packages in publications. 300s 300s Type 'demo()' for some demos, 'help()' for on-line help, or 300s 'help.start()' for an HTML browser interface to help. 300s Type 'q()' to quit R. 300s 300s > library(expm) 300s Loading required package: Matrix 301s > 301s > (sI <- sessionInfo()) 301s 301s Attaching package: ‘expm’ 301s 301s The following object is masked from ‘package:Matrix’: 301s 301s expm 301s 301s R version 4.4.3 (2025-02-28) 301s Platform: aarch64-unknown-linux-gnu 301s Running under: Ubuntu Plucky Puffin (development branch) 301s 301s Matrix products: default 301s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.1 301s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.1; LAPACK version 3.12.0 301s 301s locale: 301s [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 301s [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 301s [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C 301s [10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C 301s 301s time zone: Etc/UTC 301s tzcode source: system (glibc) 301s 301s attached base packages: 301s [1] stats graphics grDevices utils datasets methods base 301s 301s other attached packages: 301s [1] expm_1.0-0 Matrix_1.7-3 301s 301s loaded via a namespace (and not attached): 301s [1] compiler_4.4.3 grid_4.4.3 lattice_0.22-6 301s > packageDescription("Matrix") 301s Package: Matrix 301s Version: 1.7-3 301s VersionNote: do also bump src/version.h, inst/include/Matrix/version.h 301s Date: 2025-03-05 301s Priority: recommended 301s Title: Sparse and Dense Matrix Classes and Methods 301s Description: A rich hierarchy of sparse and dense matrix classes, 301s including general, symmetric, triangular, and diagonal matrices 301s with numeric, logical, or pattern entries. Efficient methods 301s for operating on such matrices, often wrapping the 'BLAS', 301s 'LAPACK', and 'SuiteSparse' libraries. 301s License: GPL (>= 2) | file LICENCE 301s URL: https://Matrix.R-forge.R-project.org 301s BugReports: https://R-forge.R-project.org/tracker/?atid=294&group_id=61 301s Contact: Matrix-authors@R-project.org 301s Authors@R: c(person("Douglas", "Bates", role = "aut", comment = c(ORCID 301s = "0000-0001-8316-9503")), person("Martin", "Maechler", role = 301s c("aut", "cre"), email = "mmaechler+Matrix@gmail.com", comment 301s = c(ORCID = "0000-0002-8685-9910")), person("Mikael", "Jagan", 301s role = "aut", comment = c(ORCID = "0000-0002-3542-2938")), 301s person("Timothy A.", "Davis", role = "ctb", comment = c(ORCID = 301s "0000-0001-7614-6899", "SuiteSparse libraries", "collaborators 301s listed in dir(system.file(\"doc\", \"SuiteSparse\", 301s package=\"Matrix\"), pattern=\"License\", full.names=TRUE, 301s recursive=TRUE)")), person("George", "Karypis", role = "ctb", 301s comment = c(ORCID = "0000-0003-2753-1437", "METIS library", 301s "Copyright: Regents of the University of Minnesota")), 301s person("Jason", "Riedy", role = "ctb", comment = c(ORCID = 301s "0000-0002-4345-4200", "GNU Octave's condest() and 301s onenormest()", "Copyright: Regents of the University of 301s California")), person("Jens", "Oehlschlägel", role = "ctb", 301s comment = "initial nearPD()"), person("R Core Team", role = 301s "ctb", comment = c(ROR = "02zz1nj61", "base R's matrix 301s implementation"))) 301s Depends: R (>= 4.4), methods 301s Imports: grDevices, graphics, grid, lattice, stats, utils 301s Suggests: MASS, datasets, sfsmisc, tools 301s Enhances: SparseM, graph 301s LazyData: no 301s LazyDataNote: not possible, since we use data/*.R and our S4 classes 301s BuildResaveData: no 301s Encoding: UTF-8 301s NeedsCompilation: yes 301s Packaged: 2025-03-05 09:59:22 UTC; maechler 301s Author: Douglas Bates [aut] (), 301s Martin Maechler [aut, cre] 301s (), Mikael Jagan [aut] 301s (), Timothy A. Davis 301s [ctb] (, SuiteSparse 301s libraries, collaborators listed in dir(system.file("doc", 301s "SuiteSparse", package="Matrix"), pattern="License", 301s full.names=TRUE, recursive=TRUE)), George Karypis [ctb] 301s (, METIS library, 301s Copyright: Regents of the University of Minnesota), Jason Riedy 301s [ctb] (, GNU Octave's 301s condest() and onenormest(), Copyright: Regents of the 301s University of California), Jens Oehlschlägel [ctb] (initial 301s nearPD()), R Core Team [ctb] (02zz1nj61, base R's matrix 301s implementation) 301s Maintainer: Martin Maechler 301s Repository: CRAN 301s Date/Publication: 2025-03-11 07:20:02 UTC 301s Built: R 4.4.3; aarch64-unknown-linux-gnu; 'Tue, 11 Mar 2025 07:27:34 301s -0500'; unix 301s 301s -- File: /usr/lib/R/library/Matrix/Meta/package.rds 301s > packageDescription("expm") 301s Package: expm 301s Type: Package 301s Title: Matrix Exponential, Log, 'etc' 301s Version: 1.0-0 301s Date: 2024-08-19 301s Authors@R: c(person("Martin", "Maechler", role=c("aut","cre"), 301s email="maechler@stat.math.ethz.ch", comment = c(ORCID = 301s "0000-0002-8685-9910")) , person("Christophe","Dutang", role = 301s "aut", comment = c(ORCID = "0000-0001-6732-1501")) , 301s person("Vincent", "Goulet", role = "aut", comment = c(ORCID = 301s "0000-0002-9315-5719")) , person("Douglas", "Bates", role = 301s "ctb", comment = "cosmetic clean up, in svn r42") , 301s person("David", "Firth", role = "ctb", comment = "expm(method= 301s \"PadeO\" and \"TaylorO\")") , person("Marina", "Shapira", role 301s = "ctb", comment = "expm(method= \"PadeO\" and \"TaylorO\")") , 301s person("Michael", "Stadelmann", role = "ctb", comment = 301s "\"Higham08*\" methods, see ?expm.Higham08...") ) 301s Contact: expm-developers@lists.R-forge.R-project.org 301s Description: Computation of the matrix exponential, logarithm, sqrt, 301s and related quantities, using traditional and modern methods. 301s Depends: Matrix 301s Imports: methods 301s Suggests: RColorBrewer, sfsmisc, Rmpfr 301s BuildResaveData: no 301s License: GPL (>= 2) 301s URL: https://R-Forge.R-project.org/projects/expm/ 301s BugReports: 301s https://R-forge.R-project.org/tracker/?atid=472&group_id=107 301s Encoding: UTF-8 301s NeedsCompilation: yes 301s Packaged: 2024-08-19 09:24:41 UTC; maechler 301s Author: Martin Maechler [aut, cre] 301s (), Christophe Dutang 301s [aut] (), Vincent Goulet 301s [aut] (), Douglas Bates 301s [ctb] (cosmetic clean up, in svn r42), David Firth [ctb] 301s (expm(method= "PadeO" and "TaylorO")), Marina Shapira [ctb] 301s (expm(method= "PadeO" and "TaylorO")), Michael Stadelmann [ctb] 301s ("Higham08*" methods, see ?expm.Higham08...) 301s Maintainer: Martin Maechler 301s Repository: CRAN 301s Date/Publication: 2024-08-19 15:20:07 UTC 301s Built: R 4.4.1; aarch64-unknown-linux-gnu; 'Mon, 07 Oct 2024 13:27:09 301s +0900'; unix 301s 301s -- File: /usr/lib/R/site-library/expm/Meta/package.rds 301s > 301s > source(system.file("test-tools.R", package= "expm"), keep.source=FALSE) 301s Loading required package: tools 301s > 301s > ## Note that these results are achieved with the default 301s > ## settings order=8, method="Pade" -- accuracy could 301s > ## presumably be improved still further by some tuning 301s > ## of these settings. 301s > 301s > ### Latest ATLAS (for BDR on F 36; R-devel Oct.2023) has much worse precision: 301s > ##==> use much larger tolerance in such cases: 301s > 301s > ## Simplified (needs R 3.4.0 and newer, from robustbase/inst/xtraR/platform-sessionInfo.R ) : 301s > BLAS <- extSoftVersion()[["BLAS"]] 301s > Lapack <- La_library() 301s > is.BLAS.Lapack <- identical(BLAS, Lapack) 301s > ## A cheap check (that works on KH's debian-gcc setup, 2019-05): 301s > if(!length(BLAS.is.openBLAS <- grepl("openblas", BLAS, ignore.case=TRUE))) 301s + BLAS.is.openBLAS <- NA 301s > if(!length(Lapack.is.openBLAS <- grepl("openblas", Lapack, ignore.case=TRUE))) 301s + Lapack.is.openBLAS <- NA 301s > 301s > (maybeATLAS <- is.BLAS.Lapack && !BLAS.is.openBLAS) 301s [1] FALSE 301s > 301s > 301s > ## ---------------------------- 301s > ## Test case 1 from Ward (1977) 301s > ## ---------------------------- 301s > T1 <- rbind(c(4, 2, 0), 301s + c(1, 4, 1), 301s + c(1, 1, 4)) 301s > (m1 <- expm(T1, method="Pade")) 301s [,1] [,2] [,3] 301s [1,] 147.8666 183.7651 71.79703 301s [2,] 127.7811 183.7651 91.88257 301s [3,] 127.7811 163.6796 111.96811 301s attr(,"accuracy") 301s [1] 6.493412e-12 301s > (m1O <- expm(T1, method="PadeO"))# very slightly different 301s [,1] [,2] [,3] 301s [1,] 147.8666 183.7651 71.79703 301s [2,] 127.7811 183.7651 91.88257 301s [3,] 127.7811 163.6796 111.96811 301s attr(,"accuracy") 301s [1] 6.493412e-12 301s > (m1T <- expm(T1, method="Taylor")) 301s [,1] [,2] [,3] 301s [1,] 147.8666 183.7651 71.79703 301s [2,] 127.7811 183.7651 91.88257 301s [3,] 127.7811 163.6796 111.96811 301s attr(,"accuracy") 301s [1] 1.774935e-13 301s > (m1TO <- expm(T1, method="TaylorO")) 301s [,1] [,2] [,3] 301s [1,] 147.8666 183.7651 71.79703 301s [2,] 127.7811 183.7651 91.88257 301s [3,] 127.7811 163.6796 111.96811 301s attr(,"accuracy") 301s [1] 1.774935e-13 301s > ## True Eigenvalue Decomposition of T1 301s > s2 <- sqrt(2) 301s > eV1 <- matrix(c(s2,s2,s2, -2,1,1, 2,-1,-1) / sqrt(6), 301s + 3,3) 301s > L1 <- diag(lm1 <- c(6, 3, 3)) 301s > stopifnot( 301s + all.equal(eV1 %*% L1, T1 %*% eV1, tolerance=1e-15) 301s + ) 301s > ## However, eV1 is not orthogonal, but of rank 2 301s > 301s > if(FALSE) { ## require("Rmpfr")) { ## 200 bit precision version of that 301s + S2 <- sqrt(mpfr(2,200)) 301s + E1 <- c(S2,S2,S2, -2,1,1, 2,-1,-1) / sqrt(mpfr(6,200)) 301s + dim(E1) <- c(3,3) 301s + print(E1 %*% L1) 301s + print(E1) 301s + } 301s > 301s > ## "true" result 301s > m1.t <- matrix(c(147.866622446369, 127.781085523181, 127.781085523182, 301s + 183.765138646367, 183.765138646366, 163.679601723179, 301s + 71.797032399996, 91.8825693231832, 111.968106246371), 3,3) 301s > stopifnot(all.equal(m1.t, m1, check.attributes=FALSE, tolerance = 1e-13), 301s + all.equal(m1.t, m1O, check.attributes=FALSE, tolerance = 1e-13), 301s + all.equal(m1.t,m1T, check.attributes=FALSE, tolerance = 1e-13), 301s + all.equal(m1.t,m1TO, check.attributes=FALSE, tolerance = 1e-13), 301s + all.equal(m1.t, expm(T1,"Ward77"), tolerance = 1e-13), 301s + all.equal(m1.t, expm(T1,"R_Pade"), tolerance = 1e-13), 301s + all.equal(m1.t, expm(T1,"R_Ward77"), tolerance = 1e-13)) 301s > ## -- these agree with ward (1977, p608) 301s > ## 301s > m1.2 <- try( expm(T1, "R_Eigen") ) ## 32-bit: gives an error from solve; 64-bit "ok" 301s > if(!inherits(m1.2, "try-error")) { 301s + if(FALSE)## with libatlas R_Eigen is "sehr eigen" 301s + stopifnot(all.equal(m1.t, m1.2, check.attributes=FALSE)) 301s + ## but it's less accurate: 301s + print( all.equal(m1.t, m1.2, check.attributes=FALSE, tolerance= 1e-12)) 301s + ##-> rel.diff = 6.44e-10 / 6.2023e-10 301s + ##__ BUT 0.1228099 301s + ##__ with libatlas (ubuntu 12.04 libatlas-base-dev Version: 3.8.4-3build1) 301s + } 301s [1] "Mean relative difference: 0.07815844" 301s > 301s > ## 301s > ## ---------------------------- 301s > ## Test case 2 from Ward (1977) 301s > ## ---------------------------- 301s > T2 <- t(matrix(c( 301s + 29.87942128909879, .7815750847907159, -2.289519314033932, 301s + .7815750847907159, 25.72656945571064, 8.680737820540137, 301s + -2.289519314033932, 8.680737820540137, 34.39400925519054), 301s + 3, 3)) 301s > (m2 <- expm(T2, method="Pade")) 301s [,1] [,2] [,3] 301s [1,] 5.496314e+15 -1.823188e+16 -3.047577e+16 301s [2,] -1.823188e+16 6.060523e+16 1.012918e+17 301s [3,] -3.047577e+16 1.012918e+17 1.692944e+17 301s attr(,"accuracy") 301s [1] 13550 301s > ## [,1] [,2] [,3] 301s > ##[1,] 5496313853692357 -18231880972009844 -30475770808580828 301s > ##[2,] -18231880972009852 60605228702227024 101291842930256144 301s > ##[3,] -30475770808580840 101291842930256144 169294411240859072 301s > ## -- which agrees with Ward (1977) to 13 significant figures 301s > (m2O <- expm(T2, method="PadeO")) 301s [,1] [,2] [,3] 301s [1,] 5.496314e+15 -1.823188e+16 -3.047577e+16 301s [2,] -1.823188e+16 6.060523e+16 1.012918e+17 301s [3,] -3.047577e+16 1.012918e+17 1.692944e+17 301s attr(,"accuracy") 301s [1] 13550 301s > (m2T <- expm(T2,method="Taylor")) 301s [,1] [,2] [,3] 301s [1,] 5.496314e+15 -1.823188e+16 -3.047577e+16 301s [2,] -1.823188e+16 6.060523e+16 1.012918e+17 301s [3,] -3.047577e+16 1.012918e+17 1.692944e+17 301s attr(,"accuracy") 301s [1] 6 301s > (m2TO <- expm(T2,method="TaylorO")) 301s [,1] [,2] [,3] 301s [1,] 5.496314e+15 -1.823188e+16 -3.047577e+16 301s [2,] -1.823188e+16 6.060523e+16 1.012918e+17 301s [3,] -3.047577e+16 1.012918e+17 1.692944e+17 301s attr(,"accuracy") 301s [1] 6 301s > 301s > m2.t <- matrix(c(5496313853692216, -18231880972008932, -30475770808579672, 301s + -18231880972008928, 60605228702222480, 101291842930249776, 301s + -30475770808579672, 101291842930249808, 169294411240850528), 301s + 3, 3) 301s > 301s > ## -- in this case a very similar degree of accuracy -- even Taylor is ok 301s > stopifnot(all.equal(m2.t, m2, check.attributes=FALSE, tolerance = 1e-12), 301s + all.equal(m2.t, m2O,check.attributes=FALSE, tolerance = 1e-12), 301s + all.equal(m2.t,m2T, check.attributes=FALSE, tolerance = 1e-12), 301s + all.equal(m2.t,m2TO,check.attributes=FALSE, tolerance = 1e-12), 301s + all.equal(m2.t, expm(T2,"Ward77"), tolerance = 1e-12), 301s + all.equal(m2.t, expm(T2,"R_Ward77"), tolerance = 1e-12), 301s + all.equal(m2.t, expm(T2,"R_Pade"), tolerance = 1e-12), 301s + TRUE) 301s > 301s > ## ---------------------------- 301s > ## Test case 3 from Ward (1977) 301s > ## ---------------------------- 301s > T3 <- t(matrix(c( 301s + -131, 19, 18, 301s + -390, 56, 54, 301s + -387, 57, 52), 3, 3)) 301s > (m3 <- expm(T3, method="Pade")) 301s [,1] [,2] [,3] 301s [1,] -1.509644 0.3678794 0.1353353 301s [2,] -5.632571 1.4715178 0.4060058 301s [3,] -4.934938 1.1036383 0.5413411 301s attr(,"accuracy") 301s [1] 1.267564e-10 301s > ## [,1] [,2] [,3] 301s > ##[1,] -1.5096441587713636 0.36787943910439874 0.13533528117301735 301s > ##[2,] -5.6325707997970271 1.47151775847745725 0.40600584351567010 301s > ##[3,] -4.9349383260294299 1.10363831731417195 0.54134112675653534 301s > ## -- agrees to 10dp with Ward (1977), p608. 301s > (m3O <- expm(T3, method="PadeO")) 301s [,1] [,2] [,3] 301s [1,] -1.509644 0.3678794 0.1353353 301s [2,] -5.632571 1.4715178 0.4060058 301s [3,] -4.934938 1.1036383 0.5413411 301s attr(,"accuracy") 301s [1] 1.267564e-10 301s > (m3T <- expm(T3,method="Taylor")) 301s [,1] [,2] [,3] 301s [1,] -1.509644 0.3678794 0.1353353 301s [2,] -5.632571 1.4715178 0.4060058 301s [3,] -4.934938 1.1036383 0.5413411 301s attr(,"accuracy") 301s [1] 0 301s > (m3TO <- expm(T3,method="TaylorO")) 301s [,1] [,2] [,3] 301s [1,] -1.509644 0.3678794 0.1353353 301s [2,] -5.632571 1.4715178 0.4060058 301s [3,] -4.934938 1.1036383 0.5413411 301s attr(,"accuracy") 301s [1] 0 301s > 301s > m3.t <- matrix(c(-1.50964415879218, -5.6325707998812, -4.934938326092, 301s + 0.367879439109187, 1.47151775849686, 1.10363831732856, 301s + 0.135335281175235, 0.406005843524598, 0.541341126763207), 301s + 3,3) 301s > 301s > stopifnot(all.equal(m3.t, m3, check.attributes=FALSE, tolerance = 3e-11), 301s + # ^^^^^ 301s + # 1.2455e-11 for libatlas (above) 301s + all.equal(m3.t, m3T, check.attributes=FALSE, tolerance = 1e-11), 301s + all.equal(m3.t, m3O, check.attributes=FALSE, tolerance = 8e-11),# M1: 1.39e-11 301s + all.equal(m3.t, m3TO, check.attributes=FALSE, tolerance = 1e-11), 301s + all.equal(m3.t, expm(T3,"R_Eigen"), tolerance = 1e-11), 301s + all.equal(m3.t, expm(T3,"Ward77"), tolerance = 1e-11), 301s + all.equal(m3.t, expm(T3,"R_Ward"), tolerance = 1e-11), 301s + all.equal(m3.t, expm(T3,"R_Pade"), tolerance = 1e-11), 301s + TRUE) 301s > ## -- in this case, a similar level of agreement with Ward (1977). 301s > 301s > ##-------- expm() ------------------- 301s > 301s > z3 <- T3 * (1 + 1i) 301s > Lz3 <- expmAll(z3) 301s > str(Lz3) 301s List of 13 301s $ Higham08.b : cplx [1:3, 1:3] -0.427+1.3i -1.878+4.82i -1.113+4.26i ... 301s $ Higham08 : cplx [1:3, 1:3] -0.427+1.3i -1.878+4.82i -1.113+4.26i ... 301s $ AlMohy-Hi09 : chr "matexp_MH09(.) is _not yet_ implemented for complex matrices" 301s $ Ward77 : chr "invalid argument: not a numeric matrix" 301s $ PadeRBS : chr "expm(, method='PadeRBS') is not (yet) implemented" 301s $ Pade : chr "expm(, method='Pade') is not (yet) implemented" 301s $ Taylor : chr "expm(, method='Taylor') is not (yet) implemented" 301s $ PadeO : chr "expm(, method='PadeO') is not (yet) implemented" 301s $ TaylorO : chr "expm(, method='TaylorO') is not (yet) implemented" 301s $ R_Eigen : cplx [1:3, 1:3] -0.427+1.3i -1.878+4.82i -1.113+4.26i ... 301s $ R_Pade : cplx [1:3, 1:3] -0.427+1.3i -1.878+4.82i -1.113+4.26i ... 301s $ R_Ward77 : cplx [1:3, 1:3] -0.427+1.3i -1.878+4.82i -1.113+4.26i ... 301s $ hybrid_Eigen_Ward: chr "invalid argument: not a numeric matrix" 301s > Lz3. <- Lz3[.methComplex] 301s > str(allEq(Lz3., tol=0)) # -> max seen (Lnx 64): 1.3376e-12 301s List of 4 301s $ Higham08: chr "Mean relative Mod difference: 1.501078e-12" 301s $ R_Eigen : chr "Mean relative Mod difference: 1.930158e-13" 301s $ R_Pade : chr "Mean relative Mod difference: 2.522483e-13" 301s $ R_Ward77: chr "Mean relative Mod difference: 6.756247e-13" 301s > stopifnot(unlist(allEq(Lz3.))) 301s > 301s > 301s > ## ---------------------------- 301s > ## Test case 4 from Ward (1977) 301s > ## ---------------------------- 301s > T4 <- 301s + array(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 1e-10, 301s + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 301s + 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 301s + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 301s + 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 301s + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 301s + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 301s + 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 301s + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 301s + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0), 301s + dim = c(10, 10)) 301s > (m4 <- expm(T4, method="Pade")) 301s [,1] [,2] [,3] [,4] [,5] 301s [1,] 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 301s [2,] 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 301s [3,] 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 301s [4,] 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 301s [5,] 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 301s [6,] 8.333333e-13 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 301s [7,] 4.166667e-12 8.333333e-13 1.388889e-13 1.984127e-14 2.480159e-15 301s [8,] 1.666667e-11 4.166667e-12 8.333333e-13 1.388889e-13 1.984127e-14 301s [9,] 5.000000e-11 1.666667e-11 4.166667e-12 8.333333e-13 1.388889e-13 301s [10,] 1.000000e-10 5.000000e-11 1.666667e-11 4.166667e-12 8.333333e-13 301s [,6] [,7] [,8] [,9] [,10] 301s [1,] 8.333333e-03 1.388889e-03 1.984127e-04 2.480159e-05 2.755732e-06 301s [2,] 4.166667e-02 8.333333e-03 1.388889e-03 1.984127e-04 2.480159e-05 301s [3,] 1.666667e-01 4.166667e-02 8.333333e-03 1.388889e-03 1.984127e-04 301s [4,] 5.000000e-01 1.666667e-01 4.166667e-02 8.333333e-03 1.388889e-03 301s [5,] 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 8.333333e-03 301s [6,] 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 301s [7,] 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 301s [8,] 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 301s [9,] 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 301s [10,] 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 301s attr(,"accuracy") 301s [1] 6.023198e-15 301s > (m4O <- expm(T4, method="PadeO")) 301s [,1] [,2] [,3] [,4] [,5] 301s [1,] 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 301s [2,] 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 301s [3,] 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 301s [4,] 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 301s [5,] 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 301s [6,] 8.333333e-13 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 301s [7,] 4.166667e-12 8.333333e-13 1.388889e-13 1.984127e-14 2.480159e-15 301s [8,] 1.666667e-11 4.166667e-12 8.333333e-13 1.388889e-13 1.984127e-14 301s [9,] 5.000000e-11 1.666667e-11 4.166667e-12 8.333333e-13 1.388889e-13 301s [10,] 1.000000e-10 5.000000e-11 1.666667e-11 4.166667e-12 8.333333e-13 301s [,6] [,7] [,8] [,9] [,10] 301s [1,] 8.333333e-03 1.388889e-03 1.984127e-04 2.480159e-05 2.755732e-06 301s [2,] 4.166667e-02 8.333333e-03 1.388889e-03 1.984127e-04 2.480159e-05 301s [3,] 1.666667e-01 4.166667e-02 8.333333e-03 1.388889e-03 1.984127e-04 301s [4,] 5.000000e-01 1.666667e-01 4.166667e-02 8.333333e-03 1.388889e-03 301s [5,] 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 8.333333e-03 301s [6,] 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 301s [7,] 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 301s [8,] 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 301s [9,] 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 301s [10,] 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 301s attr(,"accuracy") 301s [1] 6.023198e-15 301s > (m4T <- expm(T4,method="Taylor")) 301s [,1] [,2] [,3] [,4] [,5] 301s [1,] 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 301s [2,] 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 301s [3,] 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 301s [4,] 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 301s [5,] 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 301s [6,] 8.333333e-13 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 301s [7,] 4.166667e-12 8.333333e-13 1.388889e-13 1.984127e-14 2.480159e-15 301s [8,] 1.666667e-11 4.166667e-12 8.333333e-13 1.388889e-13 1.984127e-14 301s [9,] 5.000000e-11 1.666667e-11 4.166667e-12 8.333333e-13 1.388889e-13 301s [10,] 1.000000e-10 5.000000e-11 1.666667e-11 4.166667e-12 8.333333e-13 301s [,6] [,7] [,8] [,9] [,10] 301s [1,] 8.333333e-03 1.388889e-03 1.984127e-04 2.480159e-05 2.755732e-06 301s [2,] 4.166667e-02 8.333333e-03 1.388889e-03 1.984127e-04 2.480159e-05 301s [3,] 1.666667e-01 4.166667e-02 8.333333e-03 1.388889e-03 1.984127e-04 301s [4,] 5.000000e-01 1.666667e-01 4.166667e-02 8.333333e-03 1.388889e-03 301s [5,] 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 8.333333e-03 301s [6,] 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 301s [7,] 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 301s [8,] 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 301s [9,] 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 301s [10,] 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 301s attr(,"accuracy") 301s [1] 2.505947e-18 301s > (m4TO <- expm(T4,method="TaylorO")) 301s [,1] [,2] [,3] [,4] [,5] 301s [1,] 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 301s [2,] 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 301s [3,] 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 301s [4,] 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 301s [5,] 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 301s [6,] 8.333333e-13 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 301s [7,] 4.166667e-12 8.333333e-13 1.388889e-13 1.984127e-14 2.480159e-15 301s [8,] 1.666667e-11 4.166667e-12 8.333333e-13 1.388889e-13 1.984127e-14 301s [9,] 5.000000e-11 1.666667e-11 4.166667e-12 8.333333e-13 1.388889e-13 301s [10,] 1.000000e-10 5.000000e-11 1.666667e-11 4.166667e-12 8.333333e-13 301s [,6] [,7] [,8] [,9] [,10] 301s [1,] 8.333333e-03 1.388889e-03 1.984127e-04 2.480159e-05 2.755732e-06 301s [2,] 4.166667e-02 8.333333e-03 1.388889e-03 1.984127e-04 2.480159e-05 301s [3,] 1.666667e-01 4.166667e-02 8.333333e-03 1.388889e-03 1.984127e-04 301s [4,] 5.000000e-01 1.666667e-01 4.166667e-02 8.333333e-03 1.388889e-03 301s [5,] 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 8.333333e-03 301s [6,] 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 301s [7,] 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 301s [8,] 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 301s [9,] 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 301s [10,] 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 301s attr(,"accuracy") 301s [1] 2.505947e-18 301s > 301s > ## ATLAS on BDR's gannet (Fedora 26; gcc-13; R-devel 2023-10-24) 301s > tol1 <- if(maybeATLAS) 4e-7 else 5e-15 # (m4, m4O) gave "Mean relative difference: 1.242879e-07" 301s > 301s > stopifnot(all.equal(m4 [,10], 1/gamma(10:1), tolerance=1e-14), 301s + all.equal(m4O [,10], 1/gamma(10:1), tolerance=1e-14), 301s + all.equal(m4T [,10], 1/gamma(10:1), tolerance=1e-14), 301s + all.equal(m4TO[,10], 1/gamma(10:1), tolerance=1e-14), 301s + all.equal(m4, m4O, check.attributes=FALSE, tolerance=tol1), 301s + all.equal(m4, m4T, check.attributes=FALSE, tolerance=tol1), 301s + all.equal(m4, m4TO,check.attributes=FALSE, tolerance=tol1), 301s + all.equal(m4, expm(T4,"Ward77"), check.attributes=FALSE, tolerance = 1e-14), 301s + all.equal(m4, expm(T4,"R_Ward"), check.attributes=FALSE, tolerance = 1e-14), 301s + all.equal(m4, expm(T4,"R_Pade"), check.attributes=FALSE, tolerance = 1e-14), 301s + max(abs(m4 - expm(T4,"R_Eigen"))) < 1e-7) 301s > ## here expm(., EV ) is accurate only to 7 d.p., whereas 301s > ## expm(.,Pade) is correct to at least 14 d.p. 301s > 301s > ### Test case with diagonalizable matrix with multiple Eigen values: 301s > A4 <- rbind(c(-1, 3, -1), 301s + c(-3, 5, -1), 301s + c(-3, 3, 1)) 301s > Ea4 <- eigen(A4) 301s > stopifnot(all.equal(Ea4$values, (lam4 <- c(2,2,1)))) 301s > ## However, the eigen values don't show the nice property: 301s > V4 <- Ea4$vectors 301s > crossprod(V4) 301s [,1] [,2] [,3] 301s [1,] 1.0000000 -0.6750957 -0.6903482 301s [2,] -0.6750957 1.0000000 0.9907611 301s [3,] -0.6903482 0.9907611 1.0000000 301s > ## i.e., they are *not* orthogonal 301s > ## but still diagonalize: 301s > stopifnot(all.equal(A4, 301s + V4 %*% diag(x=lam4) %*% solve(V4))) 301s > ## whereas this diagonalizes *and* looks nice 301s > W4 <- rbind(c(1, 1, -1), 301s + c(1, 1, 0), 301s + c(1, 0, 3)) 301s > (sW4 <- solve(W4)) 301s [,1] [,2] [,3] 301s [1,] 3 -3 1 301s [2,] -3 4 -1 301s [3,] -1 1 0 301s > assert.EQ(diag(x = c(1,2,2)), solve(W4) %*% A4 %*% W4, giveRE=TRUE) 301s > assert.EQ(A4, logm(expm(A4)), tol = 3e-13, giveRE=TRUE) 301s Mean relative difference: 3.240794e-15 301s > ## seen 5.5e-14 with R's own matprod 301s > 301s 301s R version 4.4.3 (2025-02-28) -- "Trophy Case" 301s Copyright (C) 2025 The R Foundation for Statistical Computing 301s Platform: aarch64-unknown-linux-gnu 301s 301s R is free software and comes with ABSOLUTELY NO WARRANTY. 301s You are welcome to redistribute it under certain conditions. 301s Type 'license()' or 'licence()' for distribution details. 301s 301s R is a collaborative project with many contributors. 301s Type 'contributors()' for more information and 301s 'citation()' on how to cite R or R packages in publications. 301s 301s Type 'demo()' for some demos, 'help()' for on-line help, or 301s 'help.start()' for an HTML browser interface to help. 301s Type 'q()' to quit R. 301s 301s > 301s > #### Example matrices from the Matlab demos // expAtv() examples 301s > 301s > library(expm) 301s Loading required package: Matrix 302s > 302s > source(system.file("test-tools.R", package= "expm"), keep.source=FALSE) 302s 302s Attaching package: ‘expm’ 302s 302s The following object is masked from ‘package:Matrix’: 302s 302s expm 302s 302s Loading required package: tools 302s > ## -> assertError(), .., expmAll(), allEq(), doExtras 302s > 302s > ## --- 1 --- 302s > ## Here, all three {eigen; Taylor; Pade(Scaling & Squaring)} should do well 302s > 302s > A1 <- rbind(0:2, 302s + c(0.5, 0, 1), 302s + 2:0) 302s > A1 302s [,1] [,2] [,3] 302s [1,] 0.0 1 2 302s [2,] 0.5 0 1 302s [3,] 2.0 1 0 302s > ml1 <- lapply(c(4:10,20), 302s + function(order) expm(A1, "Pade", order=order)) 302s > for(k in seq_len(length(ml1) - 1)) 302s + stopifnot(all.equal(ml1[[k]], ml1[[k + 1]], tolerance = 1e-12)) 302s > 302s > for(k in seq_len(length(ml1) - 1)) { 302s + print(all.equal(ml1[[k]], ml1[[k + 1]], tolerance = 0)) 302s + } 302s [1] "Attributes: < Component “accuracy”: Mean relative difference: 28.51997 >" 302s [2] "Mean relative difference: 1.084305e-14" 302s [1] "Attributes: < Component “accuracy”: Mean relative difference: 0.745486 >" 302s [2] "Mean relative difference: 4.548568e-15" 302s [1] "Attributes: < Component “accuracy”: Mean relative difference: 0.1987097 >" 302s [2] "Mean relative difference: 5.708683e-15" 302s [1] "Attributes: < Component “accuracy”: Mean relative difference: 0.1200362 >" 302s [2] "Mean relative difference: 2.860084e-15" 302s [1] "Attributes: < Component “accuracy”: Mean relative difference: 0.698739 >" 302s [2] "Mean relative difference: 7.557974e-15" 302s [1] "Attributes: < Component “accuracy”: Mean relative difference: 0.6776293 >" 302s [2] "Mean relative difference: 2.883057e-15" 302s [1] "Attributes: < Component “accuracy”: Mean relative difference: 0.708767 >" 302s [2] "Mean relative difference: 4.561152e-15" 302s > 302s > mA1 <- ml1[[4]] 302s > stopifnot(all.equal(mA1, 302s + matrix(c(5.3090812852106, 2.8087900904073, 5.1737460019740, 302s + 4.0012030182399, 2.8845155413486, 4.0012030182399, 302s + 5.5778402926177, 3.1930144369526, 5.7131755758543), 302s + 3, 3), 302s + check.attributes = FALSE, tolerance = 1e-11)) 302s > 302s > 302s > ## --- 2 --- 302s > ## Here, Taylor "fails": 302s > 302s > ## A matrix where the terms in the Taylor series become very large 302s > ## before they go to zero. 302s > A2 <- rbind(c(-147, 72), 302s + c(-192, 93)) 302s > A2 302s [,1] [,2] 302s [1,] -147 72 302s [2,] -192 93 302s > 302s > (mA2 <- expm(A2, method="Pade")) 302s [,1] [,2] 302s [1,] -0.09957414 0.0746806 302s [2,] -0.19914827 0.1493612 302s attr(,"accuracy") 302s [1] 1.619931e-12 302s > stopifnot(all.equal(mA2, 302s + matrix(c(-0.099574136735459, -0.199148273470915, 302s + 0.074680602551593 , 0.149361205103183), 302s + 2, 2), check.attributes = FALSE, tolerance = 1e-11)) 302s > mA2.T <- expm(A2, method = "Taylor") 302s > stopifnot(all.equal(mA2, mA2.T, tolerance=1e-10)) 302s > all.equal(mA2, mA2.T, tolerance=1e-14)#-> 3.2e-12 {MM: I think that's pretty good} 302s [1] "Attributes: < Component “accuracy”: Mean relative difference: 1 >" 302s [2] "Mean relative difference: 5.022335e-12" 302s > 302s > ## Try all methods -------------------------------------- 302s > (meths <- eval(formals(expm)$method)) # >= 13 .. 302s [1] "Higham08.b" "Higham08" "AlMohy-Hi09" 302s [4] "Ward77" "PadeRBS" "Pade" 302s [7] "Taylor" "PadeO" "TaylorO" 302s [10] "R_Eigen" "R_Pade" "R_Ward77" 302s [13] "hybrid_Eigen_Ward" 302s > L2 <- expmAll(A2) 302s > str(L2) 302s List of 13 302s $ Higham08.b : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 302s $ Higham08 : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 302s $ AlMohy-Hi09 : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 302s $ Ward77 : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 302s $ PadeRBS : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 302s $ Pade : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 302s ..- attr(*, "accuracy")= num 1.62e-12 302s $ Taylor : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 302s ..- attr(*, "accuracy")= num 0 302s $ PadeO : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 302s ..- attr(*, "accuracy")= num 1.62e-12 302s $ TaylorO : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 302s ..- attr(*, "accuracy")= num 0 302s $ R_Eigen : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 302s $ R_Pade : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 302s $ R_Ward77 : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 302s $ hybrid_Eigen_Ward: num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 302s > str(allEq(L2, tol=0)) # -> max seen (Lnx 64): 2.7227e-12 302s List of 12 302s $ Higham08 : logi TRUE 302s $ AlMohy-Hi09 : chr "Mean relative difference: 7.621625e-14" 302s $ Ward77 : chr "Mean relative difference: 1.647503e-13" 302s $ PadeRBS : chr "Mean relative difference: 1.70803e-13" 302s $ Pade : chr "Mean relative difference: 2.308548e-12" 302s $ Taylor : chr "Mean relative difference: 2.713787e-12" 302s $ PadeO : chr "Mean relative difference: 2.308548e-12" 302s $ TaylorO : chr "Mean relative difference: 2.713787e-12" 302s $ R_Eigen : chr "Mean relative difference: 5.58813e-14" 302s $ R_Pade : chr "Mean relative difference: 3.875056e-13" 302s $ R_Ward77 : chr "Mean relative difference: 5.790152e-13"Asserted error: system is computationally singular: reciprocal condition number = 1.11022e-16 302s 302s $ hybrid_Eigen_Ward: chr "Mean relative difference: 5.58813e-14" 302s > stopifnot(unlist(allEq(L2))) 302s > 302s > ## --- 3 --- 302s > ## Here, Eigenvalues must fail ("not a full set"): 302s > A3 <- rbind(c(-1, 1), 302s + c(0, -1)) 302s > (mA3 <- expm(A3, method="Pade")) 302s [,1] [,2] 302s [1,] 0.3678794 0.3678794 302s [2,] 0.0000000 0.3678794 302s attr(,"accuracy") 302s [1] 1.665335e-16 302s > assertError(expm(mA3, method="R_Eigen"), verbose=TRUE) 302s > em1 <- exp(-1) 302s > stopifnot(all.equal(mA3, ## and the exact solution: 302s + matrix(c(em1, 0, em1, em1), 2, 2), 302s + check.attributes = FALSE, tolerance = 1e-14)) 302s > 302s > ## using 'eps' instead of 0 : 302s > ## ---> see m2ex3() etc in ./exact-ex.R 302s > 302s > L3 <- expmAll(A3) 302s > str(L3) # R_Eigen -- ".. computationally singular .." 302s List of 13 302s $ Higham08.b : num [1:2, 1:2] 0.368 0 0.368 0.368 302s $ Higham08 : num [1:2, 1:2] 0.368 0 0.368 0.368 302s $ AlMohy-Hi09 : num [1:2, 1:2] 0.368 0 0.368 0.368 302s $ Ward77 : num [1:2, 1:2] 0.368 0 0.368 0.368 302s $ PadeRBS : num [1:2, 1:2] 0.368 0 0.368 0.368 302s $ Pade : num [1:2, 1:2] 0.368 0 0.368 0.368 302s ..- attr(*, "accuracy")= num 1.67e-16 302s $ Taylor : num [1:2, 1:2] 0.368 0 0.368 0.368 302s ..- attr(*, "accuracy")= num 0 302s $ PadeO : num [1:2, 1:2] 0.368 0 0.368 0.368 302s ..- attr(*, "accuracy")= num 1.67e-16 302s $ TaylorO : num [1:2, 1:2] 0.368 0 0.368 0.368 302s ..- attr(*, "accuracy")= num 0 302s $ R_Eigen : chr "system is computationally singular: reciprocal condition number = 1.11022e-16" 302s $ R_Pade : num [1:2, 1:2] 0.368 0 0.368 0.368 302s $ R_Ward77 : num [1:2, 1:2] 0.368 0 0.368 0.368 302s $ hybrid_Eigen_Ward: num [1:2, 1:2] 0.368 0 0.368 0.368 302s > L3. <- L3[names(L3) != "R_Eigen"] 302s > str(allEq(L3., tol=0)) # -> max seen (Lnx 64): AlMohy-Hi09 -- ".. rel.diff.: 4.8188e-9" 302s List of 11 302s $ Higham08 : logi TRUE 302s $ AlMohy-Hi09 : chr "Mean relative difference: 4.818844e-09" 302s $ Ward77 : chr "Mean relative difference: 1.50895e-16" 302s $ PadeRBS : logi TRUE 302s $ Pade : chr "Mean relative difference: 2.112529e-15" 302s $ Taylor : chr "Mean relative difference: 2.112529e-15" 302s $ PadeO : chr "Mean relative difference: 2.112529e-15" 302s $ TaylorO : chr "Mean relative difference: 2.112529e-15" 302s $ R_Pade : chr "Mean relative difference: 7.544748e-16" 302s $ R_Ward77 : logi TRUE 302s $ hybrid_Eigen_Ward: chr "Mean relative difference: 1.50895e-16" 302s > stopifnot(unlist(allEq(L3., tol = 2e-8))) 302s > 302s > 302s > 302s > ## --- 4 --- 302s > ## Here, some version of do_expm() failed: 302s > (m <- matrix(c(0,2:0),2)) 302s [,1] [,2] 302s [1,] 0 1 302s [2,] 2 0 302s > ## Eigenvalue decomposition: 302s > d <- c(sqrt(2), -sqrt(2)) 302s > V <- rbind(c(sqrt(1/3), -sqrt(1/3)), 302s + c(sqrt(2/3), sqrt(2/3))) 302s > ## ==> 302s > IV <- rbind(c( sqrt(3/4), sqrt(3/8)), 302s + c(-sqrt(3/4), sqrt(3/8))) 302s > V.IV <- V %*% IV 302s > all.equal(V.IV, diag(2), tolerance=0) 302s [1] "Mean relative difference: 1.328505e-16" 302s > stopifnot(all.equal(V.IV, diag(2))) 302s > em.true <- V %*% (exp(d) * IV) 302s > all.equal(em.true, expm::expm(m), tolerance=0) 302s [1] "Mean relative difference: 1.767004e-16" 302s > stopifnot(all.equal(em.true, expm::expm(m)), 302s + all.equal(em.true, expm::expm(m,"Pade"), check.attributes=FALSE)) 302s > 302s > L4 <- expmAll(m) 302s > str(L4) 302s List of 13 302s $ Higham08.b : num [1:2, 1:2] 2.18 2.74 1.37 2.18 302s $ Higham08 : num [1:2, 1:2] 2.18 2.74 1.37 2.18 302s $ AlMohy-Hi09 : num [1:2, 1:2] 2.18 2.74 1.37 2.18 302s $ Ward77 : num [1:2, 1:2] 2.18 2.74 1.37 2.18 302s $ PadeRBS : num [1:2, 1:2] 2.18 2.74 1.37 2.18 302s $ Pade : num [1:2, 1:2] 2.18 2.74 1.37 2.18 302s ..- attr(*, "accuracy")= num 1.92e-14 302s $ Taylor : num [1:2, 1:2] 2.18 2.74 1.37 2.18 302s ..- attr(*, "accuracy")= num 3.08e-15 302s $ PadeO : num [1:2, 1:2] 2.18 2.74 1.37 2.18 302s ..- attr(*, "accuracy")= num 1.92e-14 302s $ TaylorO : num [1:2, 1:2] 2.18 2.74 1.37 2.18 302s ..- attr(*, "accuracy")= num 3.08e-15 302s $ R_Eigen : num [1:2, 1:2] 2.18 2.74 1.37 2.18 302s $ R_Pade : num [1:2, 1:2] 2.18 2.74 1.37 2.18 302s $ R_Ward77 : num [1:2, 1:2] 2.18 2.74 1.37 2.18 302s $ hybrid_Eigen_Ward: num [1:2, 1:2] 2.18 2.74 1.37 2.18 302s > str(allEq(L4, tol=0)) # -> max seen (Lnx 64): AlMohy-Hi09 -- rel.diff.: 3.575281e-8 302s List of 12 302s $ Higham08 : logi TRUE 302s $ AlMohy-Hi09 : chr "Mean relative difference: 3.575281e-08" 302s $ Ward77 : chr "Mean relative difference: 2.624249e-16" 302s $ PadeRBS : chr "Mean relative difference: 3.673948e-16" 302s $ Pade : chr "Mean relative difference: 2.099399e-15" 302s $ Taylor : chr "Mean relative difference: 2.151884e-15" 302s $ PadeO : chr "Mean relative difference: 2.099399e-15" 302s $ TaylorO : chr "Mean relative difference: 2.151884e-15" 302s $ R_Eigen : chr "Mean relative difference: 1.878294e-16" 302s $ R_Pade : chr "Mean relative difference: 6.035772e-16" 302s $ R_Ward77 : chr "Mean relative difference: 6.035772e-16" 302s $ hybrid_Eigen_Ward: chr "Mean relative difference: 1.836974e-16" 302s > stopifnot(unlist(allEq(L4, tol = 1e-7))) 302s > L4n09 <- L4[names(L4) != "AlMohy-Hi09"] 302s > str(allEq(L4n09, tol=0)) # -> max seen (Lnx 64): 2.8625e-15 302s List of 11 302s $ Higham08 : logi TRUE 302s $ Ward77 : chr "Mean relative difference: 2.624249e-16" 302s $ PadeRBS : chr "Mean relative difference: 3.673948e-16" 302s $ Pade : chr "Mean relative difference: 2.099399e-15" 302s $ Taylor : chr "Mean relative difference: 2.151884e-15" 302s $ PadeO : chr "Mean relative difference: 2.099399e-15" 302s $ TaylorO : chr "Mean relative difference: 2.151884e-15" 302s $ R_Eigen : chr "Mean relative difference: 1.878294e-16" 302s $ R_Pade : chr "Mean relative difference: 6.035772e-16" 302s $ R_Ward77 : chr "Mean relative difference: 6.035772e-16" 302s $ hybrid_Eigen_Ward: chr "Mean relative difference: 1.836974e-16" 302s > stopifnot(unlist(allEq(L4n09, tol = 1e-13))) 302s > 302s > 302s > ###----------- expAtv() ---------------- 302s > 302s > ## Bug report, 8 Sep 2014 (R-forge Bugs item #5919), by: Peter Ralph 302s > stopifnot(expAtv(A3, v=c(0,0))$eAtv == 0) 302s > 302s > 302s > n <- 500 302s > A <- bandSparse(n,n, -1:1, diagonals = list(-(2:n), -5*(1:n), 1:(n-1))) 302s > v <- 100*(n:1) 302s > t.v <- showSys.time(rr <- expAtv(A, v=v)) 303s Time user system elapsed 303s Time 0.392 0.018 0.411 303s > if(doExtras) { ## this is an order of magnitude slower : 303s + t.A <- system.time(w. <- (eA <- expm(A, "Higham08")) %*% v) 303s + stopifnot(all.equal(rr$eAtv, as.numeric(w.))) 303s + print( mean((t.A / t.v)[c(1,3)]) )## 23.57 {nb-mm3}; 21.0 {lynne} 303s + } 303s > 303s > 303s > ## Bug report on R-forge by Peter Ralph (petrelharp) 303s > ## If the entries of A are less than about 1e-8, then expAtv(A,v) fails 303s > ## with Error: length(d <- dim(x)) == 2 is not TRUE 303s > ## ... 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...) 303s > 303s > ## To reproduce: 303s > 303s > ##' @title Compute several "scaled" versions of e^{At} v : 303s > ##' @param A n x n matrix 303s > ##' @param v n vector 303s > ##' @param s vector of scales 303s > ##' @return list of expAtv() results 303s > ##' @author Martin Maechler, based on Peter Ralph's idea: 303s > scl.e.Atv <- function(A, v, s) { 303s + c(list(I = expAtv(A, v)), 303s + unlist(lapply(s, function(l) { 303s + ## cat(sprintf(" %7g\n", l)) 303s + list(lA = expAtv(l*A, v), lAI = expAtv(l*A, v, t=1/l)) 303s + }), recursive = FALSE)) 303s + } 303s > 303s > A <- matrix( 1:9, nrow=3 )/8 303s > v <- rep(1,3) 303s > sc <- 4^c(-500, -200, -100, -5*(15:6), -2*(14:9), -17:15) 303s > ## 10^9 is too large => expm() "overflow" NaN 303s > r <- scl.e.Atv(A,v, s = sc) # at least without error 303s > (eAv <- t(sapply(r, `[[`, "eAtv"))) 303s [,1] [,2] [,3] 303s I 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000000e+00 1.000000e+00 1.000000e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000000e+00 1.000000e+00 1.000000e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000000e+00 1.000000e+00 1.000000e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000000e+00 1.000000e+00 1.000000e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000000e+00 1.000000e+00 1.000000e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000000e+00 1.000000e+00 1.000000e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000000e+00 1.000000e+00 1.000000e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000000e+00 1.000000e+00 1.000000e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000000e+00 1.000000e+00 1.000000e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000000e+00 1.000000e+00 1.000000e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000000e+00 1.000000e+00 1.000000e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000000e+00 1.000000e+00 1.000000e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000000e+00 1.000000e+00 1.000000e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000000e+00 1.000000e+00 1.000000e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000000e+00 1.000000e+00 1.000000e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000000e+00 1.000000e+00 1.000000e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000000e+00 1.000000e+00 1.000000e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000000e+00 1.000000e+00 1.000000e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000000e+00 1.000000e+00 1.000000e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000000e+00 1.000000e+00 1.000000e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000000e+00 1.000000e+00 1.000000e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000000e+00 1.000000e+00 1.000000e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000000e+00 1.000000e+00 1.000000e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000000e+00 1.000000e+00 1.000000e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000000e+00 1.000000e+00 1.000000e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000000e+00 1.000000e+00 1.000001e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000001e+00 1.000002e+00 1.000002e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000006e+00 1.000007e+00 1.000009e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000023e+00 1.000029e+00 1.000034e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000092e+00 1.000114e+00 1.000137e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.000366e+00 1.000458e+00 1.000549e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.001466e+00 1.001833e+00 1.002199e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.005883e+00 1.007353e+00 1.008823e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.023819e+00 1.029765e+00 1.035711e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.100054e+00 1.124924e+00 1.149795e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 1.490149e+00 1.610098e+00 1.730046e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 5.914433e+00 7.068231e+00 8.222030e+00 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 2.405492e+03 2.955530e+03 3.505568e+03 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 7.592135e+13 9.328559e+13 1.106498e+14 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 7.535331e+55 9.258764e+55 1.098220e+56 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA 7.312333e+223 8.984763e+223 1.065719e+224 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA NaN NaN Inf 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA NaN NaN Inf 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA NaN NaN Inf 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA NaN NaN Inf 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA NaN NaN Inf 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA NaN NaN Inf 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA NaN NaN Inf 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA NaN NaN Inf 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA NaN NaN Inf 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA NaN NaN Inf 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s lA NaN NaN NaN 303s lAI 5.914433e+00 7.068231e+00 8.222030e+00 303s > ## Ensure that indeed expAtv(A, v) =.= expAtv(e*A, v, 1/e) for e > 0 303s > ## ----- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 303s > eAv[1,] 303s [1] 5.914433 7.068231 8.222030 303s > assert.EQ.mat(unname( eAv[rep(1, length(sc)), ]), 303s + unname( eAv[1+2*seq_along(sc), ] ), tol = 1e-14) 303s > # 64-bit lynne: 2.7e-16 !! 303s > 303s > sc.Atv <- function(A,v, s) { 303s + vapply(s, function(l) expAtv(l*A, v, t=1/l)$eAtv, v) 303s + } 303s > 303s > chk.sc.Atv <- function(A,v, s, tol=1e-15) { 303s + r <- vapply(s, function(l) expAtv(l*A, v, t=1/l)$eAtv, v) 303s + I <- expAtv(A,v)$eAtv 303s + if (!isTRUE(eq <- all.equal(as.vector(r), rep(I, length(s)), tolerance = tol))) 303s + stop("not all.equal() |-> ", eq) 303s + } 303s > 303s > chk.sc.Atv(A,v, sc, tol=1e-14) 303s > ## for information: see the precision: 303s > tryCatch( chk.sc.Atv(A,v, sc, tol= 0), error=identity)$message 303s [1] "not all.equal() |-> Mean relative difference: 1.501714e-16" 303s > 303s > 303s > A0 <- matrix( c(-3,1,2,1,-2,1,0,1,-1), nrow=3, byrow=TRUE) 303s > A1 <- A0 + 1e-16*rnorm(9) 303s > ## These two also failed originally 303s > chk.sc.Atv(A0, v=10^(1:3), s=sc, tol=1e-14) 303s > chk.sc.Atv(A1, v=rep(1,3), s=sc, tol=1e-14) 303s > 303s > set.seed(17) 303s > S <- rSpMatrix(29, density = 1/64) 303s > v <- round(100*rnorm(nrow(S))) 303s > if(FALSE) ## Error in balance(baP$z, "S") : 303s + ## BLAS/LAPACK routine 'DGEBAL' gave error code -3 303s + chk.sc.Atv(S/64, v, s=sc, tol=1e-14) 303s > if(FALSE) { 303s + ## after 303s + debug(chk.sc.Atv) 303s + ## this is revealing: 303s + image(as(relErrV(I, r),"sparseMatrix")) 303s + ## ==> 303s + sc[28:29] # are giving the largest differences 303s + } 303s > 303s 303s R version 4.4.3 (2025-02-28) -- "Trophy Case" 303s Copyright (C) 2025 The R Foundation for Statistical Computing 303s Platform: aarch64-unknown-linux-gnu 303s 303s R is free software and comes with ABSOLUTELY NO WARRANTY. 303s You are welcome to redistribute it under certain conditions. 303s Type 'license()' or 'licence()' for distribution details. 303s 303s R is a collaborative project with many contributors. 303s Type 'contributors()' for more information and 303s 'citation()' on how to cite R or R packages in publications. 303s 303s Type 'demo()' for some demos, 'help()' for on-line help, or 303s 'help.start()' for an HTML browser interface to help. 303s Type 'q()' to quit R. 303s 303s > #### Examples where we know the result "exactly" 303s > 303s > library(expm) 303s Loading required package: Matrix 304s 304s Attaching package: ‘expm’ 304s 304s The following object is masked from ‘package:Matrix’: 304s 304s expm 304s 304s > 304s > options(digits = 4, width = 99, keep.source = FALSE) 304s > 304s > mSource <- function(file, ...) 304s + source(system.file(file, ..., package = "expm", mustWork=TRUE)) 304s > mSource("test-tools.R")## -> assertError(), rMat(), .. doExtras 304s Loading required package: tools 304s > mSource("demo", "exact-fn.R")# -> nilA3(), facMat(), m2ex3(), .... 304s > doExtras 304s [1] FALSE 304s > 304s > re.nilA3 <- function(xyz, EXPMlist) 304s + { 304s + stopifnot(is.list(EXPMlist)) 304s + r <- do.call(nilA3, as.list(xyz)) 304s + sapply(EXPMlist, function(Efn) relErr(r$expA, Efn(r$A))) 304s + } 304s > 304s > re.facMat <- function(n, EXPMlist, rFUN = rnorm, ...) 304s + { 304s + stopifnot(is.list(EXPMlist)) 304s + r <- facMat(n, rFUN, ...) 304s + vapply(EXPMlist, function(EXPM) { 304s + ct <- system.time(E <- EXPM(r$A), gcFirst = FALSE)[[1]] 304s + c(relErr = relErr(r$expA, E), c.time = ct) 304s + }, double(2)) 304s + } 304s > 304s > re.m2ex3 <- function(eps, EXPMlist) 304s + { 304s + stopifnot(is.list(EXPMlist)) 304s + r <- m2ex3(eps) 304s + sapply(EXPMlist, function(EXPM) relErr(r$expA, EXPM(r$A))) 304s + } 304s > 304s > ## check 1x1 matrices 304s > stopifnot( 304s + ## these had failed before 2017-03-28 (= Liselotte's 58-th birthday): 304s + all.equal(as.matrix(sqrtm(matrix(4))), matrix(2)) , 304s + all.equal(as.matrix(logm (matrix(pi))), matrix(log(pi))) , 304s + ## these had "always" worked : 304s + all.equal(as.matrix(expm (matrix(0))), matrix(1)) , 304s + all.equal(as.matrix(expm (matrix(1))), matrix(exp(1))) 304s + ) 304s > 304s > 304s > set.seed(321) 304s > re <- replicate(1000, 304s + c(re.nilA3(rlnorm(3),list(function(x)expm(x,"Pade"))), 304s + re.nilA3(rnorm(3), list(function(x)expm(x,"Pade"))))) 305s > 305s > summary(t(re)) 305s V1 V2 305s Min. :0.00e+00 Min. :0.00e+00 305s 1st Qu.:0.00e+00 1st Qu.:0.00e+00 305s Median :2.90e-17 Median :1.60e-17 305s Mean :4.42e-16 Mean :1.93e-16 305s 3rd Qu.:6.80e-17 3rd Qu.:4.20e-17 305s Max. :2.11e-14 Max. :4.60e-15 305s > stopifnot(rowMeans(re) < 1e-15, 305s + apply(re, 1, quantile, 0.80) < 1e-16, 305s + apply(re, 1, quantile, 0.90) < 2e-15, 305s + apply(re, 1, max) < c(4e-14, 6e-15)) 305s > 305s > showProc.time() 305s Time (user system elapsed): 0.371 0.04 0.413 305s > 305s > ## Check *many* random nilpotent 3 x 3 matrices: 305s > set.seed(321) 305s > RE <- replicate(1000, 305s + c(re.nilA3(rlnorm(3), list(function(x) expm(x, "Ward77"))), 305s + re.nilA3(rnorm(3), list(function(x) expm(x, "Ward77"))))) 305s > stopifnot(rowMeans(RE) < 1e-15, 305s + apply(RE, 1, quantile, 0.80) < 1e-16, 305s + apply(RE, 1, quantile, 0.90) < 2e-15, 305s + apply(RE, 1, max) < c(4e-14, 6e-15)) 305s > 305s > print(summary(t(RE))) 305s V1 V2 305s Min. :0.00e+00 Min. :0.00e+00 305s 1st Qu.:0.00e+00 1st Qu.:0.00e+00 305s Median :0.00e+00 Median :0.00e+00 305s Mean :1.61e-17 Mean :7.68e-18 305s 3rd Qu.:2.95e-17 3rd Qu.:9.51e-18 305s Max. :1.52e-16 Max. :1.50e-16 305s > epsC <- .Machine$double.eps 305s > cat("relErr(expm(.,Pade)) - relErr(expm(.,Ward77)) in Machine_eps units:\n") 305s relErr(expm(.,Pade)) - relErr(expm(.,Ward77)) in Machine_eps units: 305s > print(summary(c(re - RE)) / epsC) 305s Min. 1st Qu. Median Mean 3rd Qu. Max. 305s -0.56 0.00 0.00 1.38 0.16 94.98 305s > ## Min. 1st Qu. Median Mean 3rd Qu. Max. 305s > ## -0.6183442 0.0000000 0.0000000 1.3650410 0.1399719 94.9809161 305s > ## nb-mm3; ditto lynne (both x64), 2014-09-11: 305s > ## Min. 1st Qu. Median Mean 3rd Qu. Max. 305s > ## -0.8422 0.0000 0.0000 0.0725 0.1067 1.2205 305s > ## 32-bit [i686, florence, Linx 3.14.8-100.fc19..]: 305s > ## Min. 1st Qu. Median Mean 3rd Qu. Max. 305s > ## -0.62 0.00 0.00 1.36 0.14 95.93 305s > 305s > 305s > showProc.time() 305s Time (user system elapsed): 0.242 0 0.244 305s > 305s > ###--- A second group --- where we know the diagonalization of A --- 305s > 305s > if(!require("Matrix")) 305s + q('no') 305s > ## ------ the rest really uses 'Matrix' 305s > ##---> now use expm::expm() since Matrix has its own may mask the expm one 305s > ## ^^^^^^^^^^^^ 305s > 305s > (osV <- abbreviate(gsub("[^[:alnum:]]", '', sub("\\(.*", '', osVersion)), 12)) 305s UbuntuPluckyPuffin 305s "UbntPlckyPff" 305s > if(!dev.interactive(TRUE)) pdf(paste0("expm_exact-ex_", osV, ".pdf"), width = 9, height=5) 305s > ## 305s > myRversion <- paste(R.version.string, "--", osVersion) 305s > if((mach <- Sys.info()[["machine"]]) != "x86_64") 305s + myRversion <- paste0(myRversion, "_", mach) 305s > if(!capabilities("long.double")) 305s + myRversion <- paste0(myRversion, "_no_LDbl") 305s > myRversion 305s [1] "R version 4.4.3 (2025-02-28) -- Ubuntu Plucky Puffin (development branch)_aarch64" 305s > ## in plots use mtext(myRversion, adj=1, cex=3/4) 305s > 305s > 305s > ## rMat() relies on Matrix::rcond(): 305s > ## Now with the change default rcondMin, this "works" 305s > R40 <- rMat(40) 305s > R80 <- rMat(80) 305s > showProc.time() 305s Time (user system elapsed): 0.059 0.002 0.061 305s > 305s > expm.safe.Eigen <- function(x, silent = FALSE) { 305s + r <- try(expm::expm(x, "R_Eigen"), silent = silent) 305s + if(inherits(r, "try-error")) NA else r 305s + } 305s > 305s > ## the S4 generic 305s > Matrix::expm 305s standardGeneric for "expm" defined from package "Matrix" 305s 305s function (x) 305s standardGeneric("expm") 305s 305s 305s Methods may be defined for arguments: x 305s Use showMethods(expm) for currently available ones. 305s > ## the dgeMatrix method - adapted to Matrix changes, had *more versatile* ..2dge() : 305s > expm.Matr.dge <- function(x) getDataPart(getMethod("expm", "dgeMatrix"))(Matrix::.m2dense(x)) 305s > 305s > expmList <- 305s + list(Matr = Matrix::expm, 305s + Matr.d = expm.Matr.dge, 305s + Ward = function(x) expm::expm(x, "Ward77"), 305s + Ward1b = function(x) expm::expm(x, "Ward77", preconditioning = "1bal"), 305s + RWard6 = function(x) expm::expm(x, "R_Ward77", order = 6), 305s + RWard7 = function(x) expm::expm(x, "R_Ward77", order = 7), 305s + RWard8 = function(x) expm::expm(x, "R_Ward77", order = 8), # default 305s + RWard9 = function(x) expm::expm(x, "R_Ward77", order = 9), 305s + s.P.s7 = function(x) expm::expm(x, "Pade", order = 7), 305s + s.POs7 = function(x) expm::expm(x, "PadeO",order = 7), 305s + s.P.s8 = function(x) expm::expm(x, "Pade" ,order = 8), # default 305s + s.POs8 = function(x) expm::expm(x, "PadeO",order = 8), # default 305s + s.P.s9 = function(x) expm::expm(x, "Pade", order = 9), 305s + s.POs9 = function(x) expm::expm(x, "PadeO",order = 9), 305s + s.P.sRBS = function(x) expm::expm(x, "PadeRBS"), 305s + Rs.P.s7 = function(x) expm::expm(x, "R_Pade", order = 7), 305s + Rs.P.s8 = function(x) expm::expm(x, "R_Pade", order = 8), # default 305s + Rs.P.s9 = function(x) expm::expm(x, "R_Pade", order = 9), 305s + sPs.H08. = function(x) expm:: expm.Higham08(x, balancing=FALSE), 305s + sPs.H08b = function(x) expm:: expm.Higham08(x, balancing= TRUE), 305s + ## AmHi09.06= function(x) expm:::expm.AlMoHi09(x, p = 6), 305s + AmHi09.07= function(x) expm:::expm.AlMoHi09(x, p = 7), 305s + AmHi09.08= function(x) expm:::expm.AlMoHi09(x, p = 8), # default -- really sub optimal 305s + AmHi09.09= function(x) expm:::expm.AlMoHi09(x, p = 9), 305s + AmHi09.10= function(x) expm:::expm.AlMoHi09(x, p = 10), 305s + AmHi09.11= function(x) expm:::expm.AlMoHi09(x, p = 11), 305s + AmHi09.12= function(x) expm:::expm.AlMoHi09(x, p = 12), 305s + AmHi09.13= function(x) expm:::expm.AlMoHi09(x, p = 13), 305s + s.T.s7 = function(x) expm::expm(x, "Taylor", order = 7), 305s + s.TOs7 = function(x) expm::expm(x, "TaylorO",order = 7), 305s + s.T.s8 = function(x) expm::expm(x, "Taylor", order = 8), # default 305s + s.TOs8 = function(x) expm::expm(x, "TaylorO",order = 8), # default 305s + s.T.s9 = function(x) expm::expm(x, "Taylor", order = 9), 305s + s.TOs9 = function(x) expm::expm(x, "TaylorO",order = 9), 305s + Eigen = expm.safe.Eigen, # "R_Eigen" 305s + hybrid = function(x) expm::expm(x, "hybrid") 305s + ) 305s > 305s > 305s > ## set.seed(12) 305s > ## facMchk <- replicate(if(doExtras) 100 else 20, facMat(20, rnorm)) 305s > set.seed(12) 305s > fRE <- replicate(if(doExtras) 100 else 20, 305s + re.facMat(20, expmList)) # if(doExtras) gives one "No Matrix found ..." warning 305s > nDig <- -log10(t(fRE["relErr",,])) 305s > cat("Number of correct decimal digits for facMat(20, rnorm):\n") 305s Number of correct decimal digits for facMat(20, rnorm): 305s > t(apply(nDig, 2, summary)) 305s Min. 1st Qu. Median Mean 3rd Qu. Max. 305s Matr 13.702 14.19 14.32 14.33 14.55 14.75 305s Matr.d 13.702 14.19 14.32 14.33 14.55 14.75 305s Ward 13.702 14.19 14.32 14.33 14.55 14.75 305s Ward1b 13.702 14.19 14.32 14.33 14.55 14.75Loading required namespace: sfsmisc 305s 305s RWard6 13.226 13.82 14.02 13.96 14.13 14.30 305s RWard7 13.618 13.80 13.95 13.95 14.13 14.26 305s RWard8 13.355 13.80 13.90 13.93 14.11 14.32 305s RWard9 13.498 13.75 13.79 13.90 14.11 14.25 305s s.P.s7 12.654 13.14 13.24 13.27 13.46 13.69 305s s.POs7 12.654 13.14 13.24 13.27 13.46 13.69 305s s.P.s8 12.850 13.19 13.25 13.25 13.34 13.56 305s s.POs8 12.850 13.19 13.25 13.25 13.34 13.56 305s s.P.s9 12.790 13.10 13.24 13.25 13.43 13.63 305s s.POs9 12.790 13.10 13.24 13.25 13.43 13.63 305s s.P.sRBS 13.938 14.28 14.39 14.39 14.54 14.84 305s Rs.P.s7 13.425 13.76 13.87 13.91 14.04 14.33 305s Rs.P.s8 13.423 13.78 13.93 13.91 14.08 14.26 305s Rs.P.s9 13.436 13.74 13.91 13.90 14.06 14.32 305s sPs.H08. 14.569 14.81 14.96 14.92 15.02 15.16 305s sPs.H08b 14.569 14.88 14.97 14.95 15.03 15.16 305s AmHi09.07 8.618 10.09 10.54 11.03 12.36 13.39 305s AmHi09.08 9.782 11.27 11.72 12.19 13.55 14.39 305s AmHi09.09 12.000 13.90 14.22 14.08 14.66 15.00 305s AmHi09.10 13.434 14.55 14.75 14.67 14.91 15.00 305s AmHi09.11 14.501 14.67 14.91 14.86 14.99 15.13 305s AmHi09.12 14.501 14.67 14.91 14.86 14.99 15.13 305s AmHi09.13 14.501 14.67 14.91 14.86 14.99 15.13 305s s.T.s7 13.051 13.43 13.52 13.52 13.71 13.91 305s s.TOs7 13.051 13.43 13.52 13.52 13.71 13.91 305s s.T.s8 13.051 13.43 13.52 13.52 13.71 13.91 305s s.TOs8 13.051 13.43 13.52 13.52 13.71 13.91 305s s.T.s9 13.051 13.43 13.52 13.52 13.71 13.91 305s s.TOs9 13.051 13.43 13.52 13.52 13.71 13.91 305s Eigen 14.132 14.48 14.55 14.52 14.59 14.67 305s hybrid 14.155 14.47 14.56 14.52 14.57 14.67 305s > 305s > ## Now look at that: 305s > eaxis <- if(requireNamespace("sfsmisc")) sfsmisc::eaxis else axis 305s > op <- par(mar=.1 + c(5,4 + 1.5, 4,2)) 305s > boxplot(t(fRE["relErr",,]), log="x", xaxt="n", 305s + notch=TRUE, ylim = c(8e-16, 4e-9), 305s + horizontal=TRUE, las = 1, 305s + main = "relative errors for 'random' eigen-ok 20 x 20 matrix") 305s Warning message: 305s In (function (z, notch = FALSE, width = NULL, varwidth = FALSE, : 305s some notches went outside hinges ('box'): maybe set notch=FALSE 305s > eaxis(1); grid(lty = 3); mtext(myRversion, adj=1, cex=3/4) 305s > par(op) 305s > 305s > showProc.time() 305s Time (user system elapsed): 0.536 0.018 0.558 305s > 305s > if(doExtras) withAutoprint({ # also "large" n = 100 ------------------------------------------ 305s + str(rf100 <- replicate(20, re.facMat(100, expmList))) 305s + 1000*t(apply(rf100["c.time",,], 1, summary)) 305s + ## lynne {Linux 2.6.34.7-56.fc13.x86_64 --- AMD Phenom II X4 925}: 305s + ## Min. 1st Qu. Median Mean 3rd Qu. Max. 305s + ## Ward 23 24 24.5 24.4 25.0 25 305s + ## s.P.s 107 109 109.0 109.0 109.0 112 305s + ## s.POs 188 190 191.0 192.0 193.0 198 305s + ## s.P.sRBS 17 18 19.0 18.9 19.2 21 305s + ## sPs.H08. 15 17 18.0 17.6 18.0 19 305s + ## sPs.H08b 18 18 19.0 23.4 20.0 107 305s + ## s.T.s 44 45 45.0 45.6 46.0 48 305s + ## s.TOs 96 98 99.0 100.0 100.0 116 305s + ## Eigen 18 19 20.0 24.4 21.0 109 305s + ## hybrid 40 42 42.0 47.1 44.0 133 305s + 305s + nDig <- -log10(t(rf100["relErr",,])) 305s + cat("Number of correct decimal digits for facMat(100, rnorm):\n") 305s + t(apply(nDig, 2, summary)) 305s + 305s + ##--> take out the real slow ones for the subsequent tests: 305s + (not.slow <- grep("^s\\.[PT]", names(expmList), invert = TRUE, value = TRUE)) 305s + 305s + set.seed(18) ## 12 replicates is too small .. but then it's too slow otherwise: 305s + rf400 <- replicate(12, re.facMat(400, expmList[not.slow])) 305s + 305s + showProc.time() 305s + 1000*t(apply(rf400["c.time",,], 1, summary)) 305s + ## lynne: 305s + ## Min. 1st Qu. Median Mean 3rd Qu. Max. 305s + ## Ward 1740 1790 1830 1820 1860 1900 305s + ## s.P.sRBS 1350 1420 1440 1430 1450 1460 305s + ## sPs.H08. 1020 1030 1130 1140 1210 1290 305s + ## sPs.H08b 1120 1130 1220 1220 1300 1390 305s + ## Eigen 962 977 989 992 1000 1030 305s + ## hybrid 2740 2800 2840 2840 2890 2910 305s + 305s + nDig <- -log10(t(rf400["relErr",,])) 305s + cat("Number of correct decimal digits for (12 rep. of) facMat(400, rnorm):\n") 305s + t(apply(nDig, 2, summary)) 305s + 305s + }) else { # *not* (doExtras) ----------------------------------------------------------------- 305s + ## times (in millisec): 305s + print(1000*t(apply(fRE["c.time",,], 1, summary))) 305s + } 305s Min. 1st Qu. Median Mean 3rd Qu. Max. 305s Matr 0 0.00 0.0 0.15 0.00 1 305s Matr.d 0 0.00 1.0 0.70 1.00 3 305s Ward 0 0.00 0.0 0.50 1.00 2 305s Ward1b 0 0.00 0.0 0.25 0.25 1 305s RWard6 0 0.00 0.5 0.50 1.00 1 305s RWard7 0 0.00 0.0 0.50 1.00 2 305s RWard8 0 0.00 0.0 0.30 1.00 1 305s RWard9 0 0.00 0.5 0.50 1.00 1 305s s.P.s7 0 1.00 1.0 1.00 1.00 3 305s s.POs7 0 0.00 1.0 0.70 1.00 2 305s s.P.s8 0 0.75 1.0 0.80 1.00 2 305s s.POs8 0 0.75 1.0 0.80 1.00 2 305s s.P.s9 0 0.00 1.0 0.70 1.00 2 305s s.POs9 0 0.75 1.0 0.80 1.00 2 305s s.P.sRBS 0 0.00 0.0 0.15 0.00 1 305s Rs.P.s7 0 0.00 0.0 0.35 1.00 2 305s Rs.P.s8 0 0.00 0.0 0.30 0.25 2 305s Rs.P.s9 0 0.00 0.0 0.40 1.00 1 305s sPs.H08. 0 0.00 0.0 0.30 1.00 1 305s sPs.H08b 0 0.00 0.0 0.45 1.00 2 305s AmHi09.07 0 0.00 0.0 0.30 0.25 2 305s AmHi09.08 0 0.00 0.0 0.15 0.00 1 305s AmHi09.09 0 0.00 0.0 0.20 0.00 2 305s AmHi09.10 0 0.00 0.0 0.05 0.00 1 305s AmHi09.11 0 0.00 0.0 0.15 0.00 1 305s AmHi09.12 0 0.00 0.0 0.15 0.00 2 305s AmHi09.13 0 0.00 0.0 0.20 0.00 1 305s s.T.s7 0 0.00 0.0 0.45 1.00 2 305s s.TOs7 0 0.00 0.0 0.40 1.00 2 305s s.T.s8 0 0.00 0.0 0.45 1.00 2 305s s.TOs8 0 0.00 0.0 0.30 0.25 2 305s s.T.s9 0 0.00 0.0 0.30 1.00 1 305s s.TOs9 0 0.00 0.0 0.35 1.00 1 305s Eigen 0 1.00 1.0 1.00 1.00 5 305s hybrid 0 0.00 0.0 0.40 1.00 2 305s > 305s > ## Now try an example with badly conditioned "random" M matrix... 305s > ## ... 305s > ## ... (not yet -- TODO?) 305s > 305s > ### m2ex3() --- The 2x2 example with bad condition , see A3 in ./ex2.R 305s > 305s > RE <- re.m2ex3(1e-8, expmList) 305s > sort(RE)# Ward + both sps.H08 are best; s.P.s fair, Eigen (and hybrid): ~1e-9 305s RWard6 RWard7 RWard8 RWard9 s.P.sRBS sPs.H08. sPs.H08b Rs.P.s9 Matr 305s 5.030e-17 5.030e-17 5.030e-17 5.030e-17 5.030e-17 5.030e-17 5.030e-17 5.030e-17 1.006e-16 305s Matr.d Ward Ward1b AmHi09.13 AmHi09.12 Rs.P.s7 Rs.P.s8 s.P.s8 s.POs8 305s 1.006e-16 1.006e-16 1.006e-16 2.012e-16 3.521e-16 7.042e-16 7.042e-16 2.113e-15 2.113e-15 305s s.T.s8 s.TOs8 s.T.s9 s.TOs9 s.P.s7 s.POs7 s.T.s7 s.TOs7 s.P.s9 305s 2.113e-15 2.113e-15 2.113e-15 2.113e-15 2.213e-15 2.213e-15 2.565e-15 2.565e-15 4.124e-15 305s s.POs9 AmHi09.11 AmHi09.10 AmHi09.09 Eigen hybrid AmHi09.08 AmHi09.07 305s 4.124e-15 1.363e-14 2.325e-12 6.032e-11 1.836e-09 1.836e-09 4.819e-09 6.717e-08 305s > 305s > eps <- 10^-(1:18) 305s > t.m2 <- t(sapply(eps, re.m2ex3, EXPMlist = expmList)) 306s Error in solve.default(V) : 306s system is computationally singular: reciprocal condition number = 1.11022e-16 306s Error in solve.default(V) : 306s system is computationally singular: reciprocal condition number = 1.11022e-16 306s > ## --> 3 error messages from solve(V), 5 error messages from try(. "R_Eigen" ...) 306s > 306s > showProc.time() 306s Time (user system elapsed): 0.185 Error in solve.default(V) : 306s system is computationally singular: reciprocal condition number = 1.11022e-16 306s 0.004 0.191 306s > 306s > cbind(sort(apply(log(t.m2),2, median, na.rm=TRUE))) 306s [,1] 306s RWard6 -Inf 306s RWard7 -Inf 306s RWard8 -Inf 306s RWard9 -Inf 306s Rs.P.s9 -90.55 306s sPs.H08. -83.62 306s sPs.H08b -83.62 306s s.P.sRBS -83.28 306s Matr -37.53 306s Matr.d -37.53 306s Ward -37.53 306s Ward1b -37.53 306s AmHi09.13 -36.43 306s AmHi09.12 -35.74 306s Rs.P.s7 -34.82 306s Rs.P.s8 -34.82 306s s.P.s8 -33.79 306s s.POs8 -33.79 306s s.P.s9 -33.79 306s s.POs9 -33.79 306s s.T.s8 -33.79 306s s.TOs8 -33.79 306s s.T.s9 -33.79 306s s.TOs9 -33.79 306s s.P.s7 -33.74 306s s.POs7 -33.74 306s s.T.s7 -33.58 306s s.TOs7 -33.58 306s AmHi09.11 -31.92 306s AmHi09.10 -26.79 306s hybrid -23.74 306s AmHi09.09 -23.53 306s Eigen -20.12 306s AmHi09.08 -19.15 306s AmHi09.07 -16.52 306s > ## 'na.rm=TRUE' needed for Eigen which blows up for the last 3 eps 306s > t.m2.ranks <- sort(rowMeans(apply(t.m2, 1, rank))) 306s > cbind(signif(t.m2.ranks, 3)) 306s [,1] 306s RWard6 3.19 306s RWard7 3.28 306s RWard8 3.53 306s RWard9 3.78 306s sPs.H08. 6.33 306s sPs.H08b 6.33 306s s.P.sRBS 6.78 306s Rs.P.s9 9.44 306s Matr 10.60 306s Matr.d 10.60 306s Ward 10.60 306s Ward1b 10.60 306s AmHi09.13 10.80 306s AmHi09.12 13.10 306s Rs.P.s8 14.90 306s Rs.P.s7 15.30 306s s.T.s8 20.00 306s s.TOs8 20.00 306s s.T.s9 20.20 306s s.TOs9 20.20 306s s.P.s8 21.90 306s s.POs8 21.90 306s s.P.s9 22.70 306s s.POs9 22.70 306s s.P.s7 25.60 306s s.POs7 25.60 306s s.T.s7 26.30 306s s.TOs7 26.30 306s hybrid 27.10 306s AmHi09.11 29.40 306s AmHi09.10 30.70 306s Eigen 31.10 306s AmHi09.09 31.80 306s AmHi09.08 33.10 306s AmHi09.07 34.20 306s > ## lynne (x86_64, Linux 3.14.4-100; Intel i7-4765T), 2014-09: 306s > ## sPs.H08. 2.67 306s > ## sPs.H08b 2.67 306s > ## s.P.sRBS 3.06 306s > ## Ward 4.03 306s > ## AmHi09.13 4.33 <<- still not close to H08 ! 306s > ## AmHi09.12 5.86 306s > ## s.T.s 8.33 306s > ## s.TOs 8.33 306s > ## s.P.s 9.11 306s > ## s.POs 9.11 306s > ## hybrid 10.80 306s > ## AmHi09.10 11.70 << astonishingly bad 306s > ## Eigen 12.60 306s > ## AmHi09.08 13.10 306s > ## AmHi09.06 14.40 306s > 306s > print(t.m2[, names(t.m2.ranks)[1:8]], digits = 3) 306s RWard6 RWard7 RWard8 RWard9 sPs.H08. sPs.H08b s.P.sRBS Rs.P.s9 306s [1,] 1.01e-16 1.01e-16 1.50e-16 2.01e-16 9.99e-17 9.99e-17 2.00e-16 9.53e-16 306s [2,] 2.01e-16 5.03e-17 5.03e-17 5.03e-17 1.01e-16 1.01e-16 1.01e-16 5.53e-16 306s [3,] 0.00e+00 1.01e-16 5.03e-17 5.03e-17 5.03e-17 5.03e-17 2.51e-16 4.53e-16 306s [4,] 0.00e+00 0.00e+00 7.50e-25 7.50e-25 2.51e-16 2.51e-16 3.75e-25 0.00e+00 306s [5,] 0.00e+00 1.17e-26 5.86e-27 1.17e-26 3.52e-16 3.52e-16 2.01e-16 6.54e-16 306s [6,] 5.03e-17 5.03e-17 4.57e-29 0.00e+00 2.01e-16 2.01e-16 2.01e-16 2.51e-16 306s [7,] 1.01e-16 1.01e-16 1.51e-16 1.51e-16 3.52e-16 3.52e-16 3.52e-16 7.04e-16 306s [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 306s [9,] 0.00e+00 0.00e+00 0.00e+00 0.00e+00 4.36e-35 4.36e-35 8.73e-35 4.36e-35 306s [10,] 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 306s [11,] 0.00e+00 0.00e+00 0.00e+00 0.00e+00 5.33e-39 5.33e-39 5.33e-39 5.33e-39 306s [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 306s [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 306s [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 306s [15,] 0.00e+00 0.00e+00 0.00e+00 0.00e+00 3.97e-47 3.97e-47 3.97e-47 7.94e-47 306s [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 306s [17,] 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 4.84e-51 9.69e-51 306s [18,] 0.00e+00 0.00e+00 0.00e+00 0.00e+00 3.78e-53 3.78e-53 0.00e+00 0.00e+00 306s > ## ==> 1st class: H08 (both) and (but slightly better than) Ward 306s > ## 2nd class s.T.s and s.P.s 306s > ## "bad" : hybrid and Eigen 306s > 306s > ## ??? AmHi09 - methods, up to order = 10 are worse ! 306s > if(require(RColorBrewer)) { 306s + ## Bcol <- brewer.pal(ncol(t.m2),"Dark2") 306s + Bcol <- brewer.pal(min(9, ncol(t.m2)), "Set1") 306s + Bcol <- Bcol[sqrt(colSums(col2rgb(Bcol)^2)) < 340] 306s + ## FIXME: more colors ==> ~/R/MM/GRAPHICS/color-palettes.R 306s + } else { 306s + ## 7 from Dark2 306s + ## Bcol <- c("#1B9E77", "#D95F02", "#7570B3", "#E7298A", 306s + ## "#66A61E", "#E6AB02", "#A6761D") 306s + ## Rather: those from "Set1" 306s + Bcol <- c("#E41A1C", "#377EB8", "#4DAF4A", 306s + "#984EA3", "#FF7F00", # too bright: "#FFFF33", 306s + "#A65628", "#F781BF", "#999999") 306s + } 306s > 306s > matplot(eps, t.m2, type = "b", log = "xy", col=Bcol, lty = 1:9, pch=1:15, 306s + axes=FALSE, frame = TRUE, 306s + xlab = expression(epsilon), ylab = "relative error", 306s + main = expression(expm(A, method == "*") *" relative errors for " * 306s + A == bgroup("[", atop({-1} *" "* 1, {epsilon^2} *" "*{-1}), "]"))) 306s > legend("bottomright",colnames(t.m2), col=Bcol, lty = 1:9, pch=1:15, 306s + inset = 0.02) 306s > if(requireNamespace("sfsmisc")) { 306s + sfsmisc::eaxis(1, labels=FALSE) 306s + sfsmisc::eaxis(1, at = eps[c(TRUE,FALSE)]) 306s + sfsmisc::eaxis(2) 306s + ## sfsmisc::eaxis(2, labels=FALSE) 306s + ## op <- par(las=2) 306s + ## sfsmisc::eaxis(2, at = axTicks(2,log=TRUE)[c(TRUE,FALSE,FALSE)]) 306s + ## par(op) 306s + } else { 306s + axis(1) 306s + axis(2) 306s + } 306s > 306s > ## typical case: 306s > ep <- 1e-10 306s > (me <- m2ex3(ep)) 306s $A 306s [,1] [,2] 306s [1,] -1e+00 1 306s [2,] 1e-20 -1 306s 306s $expA 306s [,1] [,2] 306s [1,] 3.679e-01 0.3679 306s [2,] 3.679e-21 0.3679 306s 306s > me$expA * exp(1) ## the correct value ; numerically identical to simple matrix: 306s [,1] [,2] 306s [1,] 1e+00 1 306s [2,] 1e-20 1 306s > ## identical() not fulfilled e.g. on Solaris 306s > stopifnot(all.equal(me$expA * exp(1), 306s + rbind(c( 1, 1), 306s + c(ep^2, 1)), 306s + tolerance = 1e-14)) 306s > ## The relative error (matrices): 306s > lapply(expmList, function(EXPM) 1 - EXPM(me$A)/me$expA) 306s $Matr 306s 2 x 2 Matrix of class "dgeMatrix" 306s [,1] [,2] 306s [1,] 0 1.11e-16 306s [2,] 0 0.00e+00 306s 306s $Matr.d 306s 2 x 2 Matrix of class "dgeMatrix" 306s [,1] [,2] 306s [1,] 0 1.11e-16 306s [2,] 0 0.00e+00 306s 306s $Ward 306s [,1] [,2] 306s [1,] 0 1.11e-16 306s [2,] 0 0.00e+00 306s 306s $Ward1b 306s [,1] [,2] 306s [1,] 0 1.11e-16 306s [2,] 0 0.00e+00 306s 306s $RWard6 306s [,1] [,2] 306s [1,] 0 0 306s [2,] 0 0 306s 306s $RWard7 306s [,1] [,2] 306s [1,] 0 0 306s [2,] 0 0 306s 306s $RWard8 306s [,1] [,2] 306s [1,] 0 0 306s [2,] 0 0 306s 306s $RWard9 306s [,1] [,2] 306s [1,] 0 0 306s [2,] 0 0 306s 306s $s.P.s7 306s [,1] [,2] 306s [1,] -2.22e-15 -2.442e-15 306s [2,] -2.22e-15 -2.220e-15 306s attr(,"accuracy") 306s [1] 2.998e-15 306s 306s $s.POs7 306s [,1] [,2] 306s [1,] -2.22e-15 -2.442e-15 306s [2,] -2.22e-15 -2.220e-15 306s attr(,"accuracy") 306s [1] 2.998e-15 306s 306s $s.P.s8 306s [,1] [,2] 306s [1,] -2.22e-15 -2.22e-15 306s [2,] -2.22e-15 -2.22e-15 306s attr(,"accuracy") 306s [1] 1.665e-16 306s 306s $s.POs8 306s [,1] [,2] 306s [1,] -2.22e-15 -2.22e-15 306s [2,] -2.22e-15 -2.22e-15 306s attr(,"accuracy") 306s [1] 1.665e-16 306s 306s $s.P.s9 306s [,1] [,2] 306s [1,] -2.22e-15 -2.22e-15 306s [2,] -2.22e-15 -2.22e-15 306s attr(,"accuracy") 306s [1] 5.662e-15 306s 306s $s.POs9 306s [,1] [,2] 306s [1,] -2.22e-15 -2.22e-15 306s [2,] -2.22e-15 -2.22e-15 306s attr(,"accuracy") 306s [1] 5.662e-15 306s 306s $s.P.sRBS 306s [,1] [,2] 306s [1,] 0 0 306s [2,] 0 0 306s 306s $Rs.P.s7 306s [,1] [,2] 306s [1,] -6.661e-16 -6.661e-16 306s [2,] -8.882e-16 -6.661e-16 306s 306s $Rs.P.s8 306s [,1] [,2] 306s [1,] -6.661e-16 -6.661e-16 306s [2,] -8.882e-16 -6.661e-16 306s 306s $Rs.P.s9 306s [,1] [,2] 306s [1,] 0 0 306s [2,] 0 0 306s 306s $sPs.H08. 306s [,1] [,2] 306s [1,] 0 0 306s [2,] 0 0 306s 306s $sPs.H08b 306s [,1] [,2] 306s [1,] 0 0 306s [2,] 0 0 306s 306s $AmHi09.07 306s [,1] [,2] 306s [1,] 1.999e-08 -1.615e-07 306s [2,] -1.615e-07 1.999e-08 306s 306s $AmHi09.08 306s [,1] [,2] 306s [1,] -1.414e-09 1.163e-08 306s [2,] 1.163e-08 -1.414e-09 306s 306s $AmHi09.09 306s [,1] [,2] 306s [1,] 1.497e-11 -1.510e-10 306s [2,] -1.510e-10 1.497e-11 306s 306s $AmHi09.10 306s [,1] [,2] 306s [1,] -5.702e-13 5.836e-12 306s [2,] 5.836e-12 -5.702e-13 306s 306s $AmHi09.11 306s [,1] [,2] 306s [1,] 2.998e-15 -3.508e-14 306s [2,] -3.486e-14 2.998e-15 306s 306s $AmHi09.12 306s [,1] [,2] 306s [1,] 1.110e-16 5.551e-16 306s [2,] 7.772e-16 1.110e-16 306s 306s $AmHi09.13 306s [,1] [,2] 306s [1,] 1.11e-16 1.11e-16 306s [2,] 2.22e-16 1.11e-16 306s 306s $s.T.s7 306s [,1] [,2] 306s [1,] 1.776e-15 -4.219e-15 306s [2,] -4.219e-15 1.776e-15 306s attr(,"accuracy") 306s [1] 2.22e-15 306s 306s $s.TOs7 306s [,1] [,2] 306s [1,] 1.776e-15 -4.219e-15 306s [2,] -4.219e-15 1.776e-15 306s attr(,"accuracy") 306s [1] 2.22e-15 306s 306s $s.T.s8 306s [,1] [,2] 306s [1,] -2.22e-15 -2.22e-15 306s [2,] -2.22e-15 -2.22e-15 306s attr(,"accuracy") 306s [1] 0 306s 306s $s.TOs8 306s [,1] [,2] 306s [1,] -2.22e-15 -2.22e-15 306s [2,] -2.22e-15 -2.22e-15 306s attr(,"accuracy") 306s [1] 0 306s 306s $s.T.s9 306s [,1] [,2] 306s [1,] -2.22e-15 -2.22e-15 306s [2,] -2.22e-15 -2.22e-15 306s attr(,"accuracy") 306s [1] 0 306s 306s $s.TOs9 306s [,1] [,2] 306s [1,] -2.22e-15 -2.22e-15 306s [2,] -2.22e-15 -2.22e-15 306s attr(,"accuracy") 306s [1] 0 306s 306s $Eigen 306s [,1] [,2] 306s [1,] 0.000e+00 -5.109e-07 306s [2,] -1.048e-06 0.000e+00 306s 306s $hybrid 306s [,1] [,2] 306s [1,] 0.000e+00 -5.109e-07 306s [2,] -2.419e-07 -2.220e-16 306s 306s > 306s > ## Average number of correct digits [less "extreme" than plot above] 306s > nDig <- sapply(expmList, function(EXPM) -log10(mean(abs(1 - EXPM(me$A)/me$expA)))) 306s > round(nDig, 2) 306s Matr Matr.d Ward Ward1b RWard6 RWard7 RWard8 RWard9 s.P.s7 306s 16.56 16.56 16.56 16.56 Inf Inf Inf Inf 14.64 306s s.POs7 s.P.s8 s.POs8 s.P.s9 s.POs9 s.P.sRBS Rs.P.s7 Rs.P.s8 Rs.P.s9 306s 14.64 14.65 14.65 14.65 14.65 Inf 15.14 15.14 Inf 306s sPs.H08. sPs.H08b AmHi09.07 AmHi09.08 AmHi09.09 AmHi09.10 AmHi09.11 AmHi09.12 AmHi09.13 306s Inf Inf 7.04 8.19 10.08 11.49 13.72 15.41 15.86 306s s.T.s7 s.TOs7 s.T.s8 s.TOs8 s.T.s9 s.TOs9 Eigen hybrid 306s 14.52 14.52 14.65 14.65 14.65 14.65 6.41 6.73 306s > ## Ward s.P.s s.POs s.T.s s.TOs Eigen hybrid 306s > ## 16.26 14.65 14.65 14.65 14.65 6.20 6.39 [AMD Opteron 64-bit] 306s > ## Inf 14.65 14.65 14.65 14.65 6.74 6.33 [Pentium-M (32-bit)] 306s > 306s > showProc.time() 306s Time (user system elapsed): 0.058 0.001 0.064 306s > 306s > ###--- rnilMat() : random upper triangular (zero-diagonal) nilpotent n x n matrix 306s > 306s > set.seed(17) 306s > m <- rnilMat(10) 306s > (m. <- as(m,"sparseMatrix"))# for nicer printing - and more *below* 306s 10 x 10 sparse Matrix of class "dtCMatrix" 306s 306s [1,] . 3 10 7 3 4 9 5 9 6 306s [2,] . . 5 4 3 . 5 6 3 6 306s [3,] . . . 5 7 7 3 7 5 6 306s [4,] . . . . 3 7 6 8 2 7 306s [5,] . . . . . 9 5 2 7 6 306s [6,] . . . . . . 8 5 4 6 306s [7,] . . . . . . . 5 5 3 306s [8,] . . . . . . . . 3 5 306s [9,] . . . . . . . . . 3 306s [10,] . . . . . . . . . . 306s > E.m <- expm::expm(m, method="Pade") 306s > as(E.m, "sparseMatrix") 306s 10 x 10 sparse Matrix of class "dtCMatrix" 306s 306s [1,] 1 3 17.5 50.5 110.9 464.7 1224.0 2169.2 3394.8 5938.8 306s [2,] . 1 5.0 16.5 39.0 172.8 476.1 865.6 1376.4 2438.8 306s [3,] . . 1.0 5.0 14.5 78.5 251.7 498.6 836.0 1540.0 306s [4,] . . . 1.0 3.0 20.5 77.5 170.2 299.4 578.0 306s [5,] . . . . 1.0 9.0 41.0 97.0 180.5 357.1 306s [6,] . . . . . 1.0 8.0 25.0 51.5 112.3 306s [7,] . . . . . . 1.0 5.0 12.5 30.5 306s [8,] . . . . . . . 1.0 3.0 9.5 306s [9,] . . . . . . . . 1.0 3.0 306s [10,] . . . . . . . . . 1.0 306s > 306s > (dN <- 9*7*320) # 20160 306s [1] 20160 306s > stopifnot(abs(round(E.m * dN) - (E.m * dN)) < 9e-6) 306s > EmN <- matrix(c(dN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 306s + 3*dN, dN, 0, 0, 0, 0, 0, 0, 0, 0, 306s + 352800, 5*dN, dN, 0, 0, 0, 0, 0, 0, 0, 306s + 1018080, 332640, 5*dN, dN, 0, 0, 0, 0, 0, 0, 306s + 2235240, 786240, 292320, 3*dN, dN, 0, 0, 0, 0, 0, 306s + 9368520, 3483480, 1582560, 413280, 181440, dN, 0, 0, 0, 0, 306s + 24676176, 9598680, 5073600, 1562400, 826560, 161280, dN, 0,0,0, 306s + 43730160, 17451000, 10051440, 3430560, 1955520, 504000, 306s + 5*dN, dN, 0, 0, 306s + 68438436, 27747480, 16853760, 6036240, 3638880, 1038240, 306s + 252000, 3*dN, dN, 0, 306s + 119725855, 49165892, 31046760, 11652480, 7198800, 2264640, 306s + 614880, 191520, 3*dN, dN), 306s + 10, 10) 306s > 306s > Em.xct <- EmN / dN 306s > all.equal(E.m, Em.xct, check.attributes = FALSE, tolerance = 0) 306s [1] "Mean relative difference: 4.522e-14" 306s > stopifnot(all.equal(E.m, Em.xct, check.attributes = FALSE, tolerance= 1e-13)) 306s > 306s > re.x <- sapply(expmList, function(EXPM) relErr(Em.xct, EXPM(m))) 306s Loading required package: RColorBrewer 306s Warning message: 306s In xy.coords(x, y, xlabel, ylabel, log = log, recycle = TRUE) : 306s 61 y values <= 0 omitted from logarithmic plot 306s Error in solve.default(V) : 306s Lapack routine dgesv: system is exactly singular: U[3,3] = 0 306s coercing to dense matrix, as required by method “Higham08.b” 306s > ## with error message from "safe.Eigen" --> Eigen is NA here 306s > ## result depends quite a bit on platform 306s > which(is.na(re.x)) # gives c(Eigen = 16L) (but not everywhere ?!?) 306s Eigen 306s 34 306s > (re.x <- re.x[!is.na(re.x)]) 306s Matr Matr.d Ward Ward1b RWard6 RWard7 RWard8 RWard9 s.P.s7 306s 7.491e-17 7.491e-17 7.491e-17 7.491e-17 1.056e-16 9.851e-17 1.009e-16 3.716e-17 2.514e-14 306s s.POs7 s.P.s8 s.POs8 s.P.s9 s.POs9 s.P.sRBS Rs.P.s7 Rs.P.s8 Rs.P.s9 306s 2.514e-14 4.502e-14 4.502e-14 2.639e-14 2.639e-14 9.143e-17 9.851e-17 1.009e-16 3.716e-17 306s sPs.H08. sPs.H08b AmHi09.07 AmHi09.08 AmHi09.09 AmHi09.10 AmHi09.11 AmHi09.12 AmHi09.13 306s 9.379e-17 9.379e-17 2.660e-16 1.150e-16 1.150e-16 1.150e-16 1.150e-16 1.150e-16 1.150e-16 306s s.T.s7 s.TOs7 s.T.s8 s.TOs8 s.T.s9 s.TOs9 hybrid 306s 3.716e-17 3.716e-17 3.716e-17 3.716e-17 3.716e-17 3.716e-17 7.491e-17 306s > 306s > ## Pentium-M 32-bit ubuntu gave 306s > ## Ward s.P.s s.POs sPs.H08. sPs.H08b s.T.s s.TOs hybrid 306s > ## 1.079e-16 4.505e-14 4.503e-14 9.379e-17 9.379e-17 3.716e-17 7.079e-18 1.079e-16 306s > ## 32-bit Quad-Core AMD Opteron 2380 (Linux 2.6.30.10-105.2.23.fc11.i686.PAE): 306s > ## Ward s.P.s s.POs sPs.H08. sPs.H08b s.T.s s.TOs hybrid 306s > ## 1.079e-16 4.505e-14 4.503e-14 9.379e-17 9.379e-17 3.716e-17 7.079e-18 1.079e-16 306s > 306s > ## "Ward77": again more accurate than s+Pade+s, but s+Taylor+s is even more accurate 306s > 306s > ## but on 64-bit AMD Opterons 306s > ## Ward s.P.s s.POs sPs.H08. sPs.H08b s.T.s s.TOs hybrid 306s > ## 4.42e-17 3.99e-17 3.99e-17 1.10e-16 1.10e-16 8.44e-17 8.44e-17 4.42e-17 306s > ## 306s > ## even more astonishing the result on Mac OSX (x86_32_mac; R-forge, R 2.9.0 patch.) 306s > ## Ward s.P.s s.POs sPs.H08. sPs.H08b s.T.s s.TOs hybrid 306s > ## 5.13e-17 3.99e-17 3.99e-17 1.84e-15 1.84e-15 8.44e-17 8.44e-17 5.13e-17 306s > 306s > ## 2014-09: AmHi09 are very good (64bit: 8e-17) for p >= 8 (p=6 has 1.5e-11) 306s > 306s > not.09.06 <- which(names(re.x) != "AmHi09.06") 306s > stopifnot(re.x[c("Ward", "s.T.s8", "s.TOs8")] < 3e-16, 306s + ## re.x[["AmHi09.06"]] < 9e-11, # x64 & 686(lnx): = 1.509e-11 306s + re.x[not.09.06] < 4e-13)# max: 686(32b): 4.52e-14, x64(lnx): 1.103e-16 306s > 306s > ##-- Looking at *sparse* matrices: [C,Fortran "dense" code based methods will fail]: 306s > (meths <- eval(formals(expm)$method)) 306s [1] "Higham08.b" "Higham08" "AlMohy-Hi09" "Ward77" 306s [5] "PadeRBS" "Pade" "Taylor" "PadeO" 306s [9] "TaylorO" "R_Eigen" "R_Pade" "R_Ward77" 306s [13] "hybrid_Eigen_Ward" 306s > ems <- sapply(meths, function(met) 306s + tryCatch(expm::expm(m., method=met), error=identity)) 306s coercing to dense matrix, as required by method “AlMohy-Hi09” 306s coercing to dense matrix, as required by method “Ward77” 306s coercing to dense matrix, as required by method “PadeRBS” 306s coercing to dense matrix, as required by method “Pade” 306s coercing to dense matrix, as required by method “Taylor” 306s coercing to dense matrix, as required by method “PadeO” 306s coercing to dense matrix, as required by method “TaylorO” 306s coercing to dense matrix, as required by method “R_Ward77” 306s coercing to dense matrix, as required by method “hybrid_Eigen_Ward” 306s > ok <- !sapply(ems, is, class2="error") 306s > meths[ok] # now most... are 306s [1] "Higham08.b" "Higham08" "AlMohy-Hi09" "Ward77" 306s [5] "PadeRBS" "Pade" "Taylor" "PadeO" 306s [9] "TaylorO" "R_Pade" "hybrid_Eigen_Ward" 306s > 306s > showProc.time() 306s Time (user system elapsed): 0.102 0 0.104 306s > 306s > ## Complex Matrices 306s > re.facMat.Z <- function(n, EXPMlist, rFUN = function(n) rnorm(n) + 1i*rnorm(n), ...) 306s + { 306s + stopifnot(is.list(EXPMlist)) 306s + r <- facMat(n, rFUN, ...) 306s + vapply(EXPMlist, function(EXPM) { 306s + ct <- system.time(E <- EXPM(r$A), gcFirst = FALSE)[[1]] 306s + c(relErr = relErr(r$expA, E), c.time = ct) 306s + }, double(2)) 306s + } 306s > 306s > (nmL <- names(expmList)) 306s [1] "Matr" "Matr.d" "Ward" "Ward1b" "RWard6" "RWard7" "RWard8" 306s [8] "RWard9" "s.P.s7" "s.POs7" "s.P.s8" "s.POs8" "s.P.s9" "s.POs9" 306s [15] "s.P.sRBS" "Rs.P.s7" "Rs.P.s8" "Rs.P.s9" "sPs.H08." "sPs.H08b" "AmHi09.07" 306s [22] "AmHi09.08" "AmHi09.09" "AmHi09.10" "AmHi09.11" "AmHi09.12" "AmHi09.13" "s.T.s7" 306s [29] "s.TOs7" "s.T.s8" "s.TOs8" "s.T.s9" "s.TOs9" "Eigen" "hybrid" 306s > ## [1] "Matr" "Matr.d" "Ward" "Ward1b" "s.P.s" "s.POs" "s.P.s7" 306s > ## [8] "s.POs7" "s.P.s9" "s.POs9" "s.P.sRBS" "sPs.H08." "sPs.H08b" "AmHi09.06" 306s > ## [15] "AmHi09.07" "AmHi09.08" "AmHi09.09" "AmHi09.10" "AmHi09.12" "AmHi09.13" "s.T.s" 306s > ## [22] "s.TOs" "s.T.s7" "s.TOs7" "s.T.s9" "s.TOs9" "Eigen" "hybrid" 306s > 306s > ## dropping "Matr", "Matr.d" (which gives "dgeMatrix" currently --> mean(.) fails ... 306s > ## "Ward" "Ward1b" and "hybrid" error "not a numeric Matrix" 306s > ## "AmHi09": C code currently only for double precision ((FIXME)) 306s > (cplxN <- grep("^(Matr|Ward|hybr|AmHi09|s\\.[PT])", nmL, invert = TRUE, value = TRUE)) 306s [1] "RWard6" "RWard7" "RWard8" "RWard9" "Rs.P.s7" "Rs.P.s8" "Rs.P.s9" "sPs.H08." 306s [9] "sPs.H08b" "Eigen" 306s > 306s > rr <- re.facMat.Z(4, expmList[cplxN]) 306s > 306s > set.seed(47) 306s > fREZ <- replicate(if(doExtras) 64 else 12, 306s + re.facMat.Z(15, expmList[cplxN])) 306s > nDig <- -log10(t(fREZ["relErr",,])) 306s > cat("Number of correct decimal digits for facMat(20, rnorm + i*rnorm):\n") 306s Number of correct decimal digits for facMat(20, rnorm + i*rnorm): 306s > t(apply(nDig, 2, summary)) 306s Min. 1st Qu. Median Mean 3rd Qu. Max. 306s RWard6 13.45 13.75 13.85 13.84 13.94 14.16 306s RWard7 13.46 13.74 13.77 13.81 13.88 14.22 306s RWard8 13.60 13.75 13.83 13.84 13.89 14.11 306s RWard9 13.54 13.78 13.87 13.85 13.92 14.24 306s Rs.P.s7 13.52 13.77 13.86 13.86 13.96 14.14 306s Rs.P.s8 13.59 13.79 13.85 13.85 13.92 14.04 306s Rs.P.s9 13.58 13.74 13.78 13.81 13.90 14.00 306s sPs.H08. 14.60 14.79 14.86 14.83 14.90 14.97 306s sPs.H08b 14.60 14.82 14.86 14.84 14.90 14.97 306s Eigen 14.19 14.35 14.46 14.43 14.53 14.55 306s > 306s > ## times (in millisec): 306s > print(1000*t(apply(fREZ["c.time",,], 1, summary))) 306s Min. 1st Qu. Median Mean 3rd Qu. Max. 306s RWard6 0 0 0.0 0.3333 1.00 1 306s RWard7 0 0 0.5 0.5000 1.00 1 306s RWard8 0 0 0.0 0.3333 1.00 1 306s RWard9 0 0 0.5 0.5000 1.00 1 306s Rs.P.s7 0 0 0.0 0.2500 0.25 1 306s Rs.P.s8 0 0 0.0 0.1667 0.00 1 306s Rs.P.s9 0 0 0.0 0.3333 1.00 1 306s sPs.H08. 0 0 0.0 0.4167 1.00 1 306s sPs.H08b 0 0 0.0 0.3333 1.00 1 306s Eigen 0 0 0.5 0.5000 1.00 1 306s > 306s > ## Now look at that: 306s > op <- par(mar=.1 + c(5,4 + 1.5, 4,2)) 306s > boxplot(t(fREZ["relErr",,]), log="x", xaxt="n", 306s + notch=TRUE, # ylim = c(8e-16, 4e-9), 306s + horizontal=TRUE, las = 1, 306s + main = "relative errors for 'random' eigen-ok 20 x 20 matrix") 306s > eaxis(1); grid(lty = 3); mtext(myRversion, adj=1, cex=3/4) 306s > par(op) 306s > 306s > 306s > 306s > showProc.time() 306s Time (user system elapsed): 0.089 0.005 0.098 306s > 306s Warning message: 306s In (function (z, notch = FALSE, width = NULL, varwidth = FALSE, : 306s some notches went outside hinges ('box'): maybe set notch=FALSE 306s 306s R version 4.4.3 (2025-02-28) -- "Trophy Case" 306s Copyright (C) 2025 The R Foundation for Statistical Computing 306s Platform: aarch64-unknown-linux-gnu 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 > #### Testing the Exponential Condition Number computations 306s > 306s > library(expm) 306s Loading required package: Matrix 307s > 307s > mSource <- function(file, ...) source(system.file(file, ..., 307s + package = "expm", mustWork=TRUE), 307s + keep.source = FALSE) 307s > mSource("test-tools.R")## -> assertError(), rMat() 307s 307s Attaching package: ‘expm’ 307s 307s The following object is masked from ‘package:Matrix’: 307s 307s expm 307s 307s Loading required package: tools 307s > ## getting examples where we know expm(.) "exactly": 307s > mSource("demo", "exact-fn.R") 307s > 307s > M <- xct10$m 307s > eC <- list(expmCondF = 566.582631819923, 307s + expmCond1 = 137.455837652872) 307s > C1 <- expmCond(M, "exact") 307s > (C2 <- expmCond(M, "1.est", expm=FALSE)) 307s [1] 137.4558 307s > (C3. <- expmCond(M, "F.est", abstol = 0.1)[[1]]) 307s [1] 566.5826 307s attr(,"iter") 307s [1] 2 307s > (C3.1 <- expmCond(M, "F.est", abstol = 0.01, reltol = 1e-12)[[1]]) 307s [1] 566.5826 307s attr(,"iter") 307s [1] 3 307s > 307s > stopifnot(all.equal(C1[1:2], eC, tolerance = 1e-14), 307s + all.equal(C2 , eC$expmCond1, tolerance = 1e-14), 307s + all.equal(C3. , eC$expmCondF, tolerance = 1e-14, check.attributes = FALSE), 307s + all.equal(C3.1, eC$expmCondF, tolerance = 1e-14, check.attributes = FALSE)) 307s > 307s > cat('Time elapsed: ', (p1 <- proc.time()),'\n') # for ``statistical reasons'' 307s Time elapsed: 1.108 0.063 1.172 0 0.005 307s > 307s > ## cat('Time elapsed: ',(p2 <- proc.time())-p1,'\n') # for ``statistical reasons'' 307s > 307s > ## cat('Time elapsed: ',(p3 <- proc.time())-p2,'\n') # for ``statistical reasons'' 307s > 307s 307s R version 4.4.3 (2025-02-28) -- "Trophy Case" 307s Copyright (C) 2025 The R Foundation for Statistical Computing 307s Platform: aarch64-unknown-linux-gnu 307s 307s R is free software and comes with ABSOLUTELY NO WARRANTY. 307s You are welcome to redistribute it under certain conditions. 307s Type 'license()' or 'licence()' for distribution details. 307s 307s R is a collaborative project with many contributors. 307s Type 'contributors()' for more information and 307s 'citation()' on how to cite R or R packages in publications. 307s 307s Type 'demo()' for some demos, 'help()' for on-line help, or 307s 'help.start()' for an HTML browser interface to help. 307s Type 'q()' to quit R. 307s 307s > library(Matrix) 308s > library(expm) 308s 308s Attaching package: ‘expm’ 308s 308s > 308s > source(system.file("test-tools.R", package = "expm"), keep.source=FALSE) 308s The following object is masked from ‘package:Matrix’: 308s 308s expm 308s 308s Loading required package: tools 308s > doExtras 308s [1] FALSE 308s > 308s > tst.sqrtm <- function(m, tol = 1e-12, zap.Im.tol = 1e-10) { 308s + r.m <- sqrtm(m)## should now work 308s + s <- r.m %*% r.m 308s + if(is.complex(s) && all(abs(Im(s)) < mean(abs(s)) * zap.Im.tol)) 308s + s <- Re(s) 308s + all.equal(m, s, tolerance=tol) 308s + } 308s > 308s > 308s > options(verbose = TRUE) # -> get some messages from logm.Higham 308s > 308s > ### ---- Small exact : ---------- 308s > L2 <- cbind(1, 0:1) 308s > lL2 <- cbind(0:1, 0) 308s > (L3 <- rbind(cbind(1,cbind(0:1,0)),1)) 308s [,1] [,2] [,3] 308s [1,] 1 0 0 308s [2,] 1 1 0 308s [3,] 1 1 1 308s > (lL3 <- cbind(rbind(0, cbind((2:1)/2,0:1)), 0)) 308s [,1] [,2] [,3] 308s [1,] 0.0 0 0 308s [2,] 1.0 0 0 308s [3,] 0.5 1 0 308s > 308s > assertError(logm(L2, method="Eigen")) 308s > assertError(logm(L3, method="Eigen")) 308s > 308s > logm.Higham08 <- expm:::logm.Higham08 308s > l.L2 <- logm.Higham08(L2) 308s > l.L3 <- logm.Higham08(L3) 308s logm.Higham08() -> (k, m) = (2, 5) 308s logm.Higham08() -> (k, m) = (4, 3) 308s > 308s > all.equal(l.L2, lL2, tolerance=0)# 5.64 e-14 (32-bit *and* 64-bit) 308s [1] "Mean relative difference: 5.639933e-14" 308s > all.equal(l.L3, lL3, tolerance=0)# 2.40 e-15 (ditto) 308s logm.Higham08() -> (k, m) = (4, 5) 308s [1] "Mean relative difference: 2.398082e-15" 308s > stopifnot(all.equal(l.L2, lL2, tolerance= 1000e-16), 308s + all.equal(l.L3, lL3, tolerance= 80e-16)) 308s > showProc.time() 308s Time (user system elapsed): 0.055 0.004 0.061 308s > 308s > ### --------- More & larger randomly generated examples : ----------------- 308s > set.seed(101) 308s > 308s > EA <- expm.Higham08(A <- matrix(round(rnorm(25),1), 5)) 308s > all.equal(EA, expm.Higham08(logm.Higham08(EA)), tolerance=0) 308s [1] "Mean relative difference: 1.001987e-13" 308s > ## "Mean relative difference: 1.020137e-13" 308s > stopifnot(all.equal(EA, expm.Higham08(logm.Higham08(EA)), tolerance=1e-12)) 308s > 308s > S <- crossprod(A) 308s > all.equal(S, sqrtm(S) %*% sqrtm(S), tolerance=0) 308s logm.Higham08() -> (k, m) = (4, 5) 308s [1] "Mean relative difference: 1.690803e-15" 308s > ## "Mean relative difference: 2.26885e-15" 308s > stopifnot(all.equal(S, sqrtm(S) %*% sqrtm(S), tolerance=1e-14)) 308s > showProc.time() 308s Time (user system elapsed): 0.032 0.007 0.039 308s > 308s > set.seed(3) 308s > 308s > ## n = 50 is already "too" slow (well: logm.Higham08(.) needs 2.2 sec 308s > ## --> CPU measurements below 308s > for(n in c(2:5, 10:11, if(doExtras) 30)) { 308s + cat("n = ",n,": ") 308s + for(kk in seq_len(if(doExtras) 30 else 10)) { 308s + ## Testing logm() 308s + EA <- expm.Higham08(A <- matrix(round(rnorm(n^2),2), n,n)) 308s + stopifnot(all.equal(EA, expm.Higham08(logm.Higham08(EA)), tolerance=1e-12)) 308s + cat(" ") 308s + ## Testing sqrtm() --- for positive definite *and* arbitrary 308s + stopifnot(tst.sqrtm(A))# A is completely random 308s + S <- crossprod(A) + rnorm(n^2) / 1000 308s + stopifnot(tst.sqrtm(S)) 308s + cat(".") 308s + } 308s + cat("\n") 308s + } 308s n = 2 : logm.Higham08() -> (k, m) = (3, 4) 308s .logm.Higham08() -> (k, m) = (4, 4) 308s .logm.Higham08() -> (k, m) = (3, 5) 308s .logm.Higham08() -> (k, m) = (3, 5) 308s .logm.Higham08() -> (k, m) = (4, 3) 308s .logm.Higham08() -> (k, m) = (4, 4) 308s 'x' has negative real eigenvalues; maybe ok for sqrtm() 308s .logm.Higham08() -> (k, m) = (4, 3) 308s logm.Higham08() -> (k, m) = (4, 4) 308s . 'x' has negative real eigenvalues; maybe ok for sqrtm() 308s .logm.Higham08() -> (k, m) = (4, 3) 308s .logm.Higham08() -> (k, m) = (3, 4) 308s . 308s n = 3 : logm.Higham08() -> (k, m) = (5, 3) 308s .'x' has negative real eigenvalues; maybe ok for sqrtm() 308s logm.Higham08() -> (k, m) = (3, 5) 308s . 'x' has negative real eigenvalues; maybe ok for sqrtm() 308s logm.Higham08() -> (k, m) = (4, 4) 308s 'x' has negative real eigenvalues; maybe ok for sqrtm() 308s .logm.Higham08() -> (k, m) = (5, 4) 308s 'x' has negative real eigenvalues; maybe ok for sqrtm() 308s .logm.Higham08() -> (k, m) = (4, 5) 308s .logm.Higham08() -> (k, m) = (4, 5) 308s . logm.Higham08() -> (k, m) = (5, 4) 308s .logm.Higham08() -> (k, m) = (5, 4) 308s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s . logm.Higham08() -> (k, m) = (4, 5) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s . . 309s n = 4 : logm.Higham08() -> (k, m) = (5, 3) 309s logm.Higham08() -> (k, m) = (5, 3) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s .logm.Higham08() -> (k, m) = (5, 4) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s . logm.Higham08() -> (k, m) = (4, 5) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s .logm.Higham08() -> (k, m) = (5, 4) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s .logm.Higham08() -> (k, m) = (5, 4) 309s . logm.Higham08() -> (k, m) = (4, 5) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s .'x' has negative real eigenvalues; maybe ok for sqrtm() 309s logm.Higham08() -> (k, m) = (5, 4) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s .logm.Higham08() -> (k, m) = (5, 4) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s .logm.Higham08() -> (k, m) = (4, 4) 309s . logm.Higham08() -> (k, m) = (4, 5) 309s . 309s n = 5 : .logm.Higham08() -> (k, m) = (5, 4) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s .logm.Higham08() -> (k, m) = (5, 4) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s logm.Higham08() -> (k, m) = (5, 3) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s .logm.Higham08() -> (k, m) = (6, 3) 309s .logm.Higham08() -> (k, m) = (6, 3) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s . logm.Higham08() -> (k, m) = (5, 4) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s . logm.Higham08() -> (k, m) = (4, 5) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s .logm.Higham08() -> (k, m) = (5, 4) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s .logm.Higham08() -> (k, m) = (6, 3) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s . logm.Higham08() -> (k, m) = (5, 4) 309s . 309s n = 10 : logm.Higham08() -> (k, m) = (7, 3) 309s .'x' has negative real eigenvalues; maybe ok for sqrtm() 309s logm.Higham08() -> (k, m) = (6, 4) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s . logm.Higham08() -> (k, m) = (6, 4) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s .logm.Higham08() -> (k, m) = (7, 3) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s . logm.Higham08() -> (k, m) = (6, 4) 309s . logm.Higham08() -> (k, m) = (6, 4) 309s .logm.Higham08() -> (k, m) = (7, 3) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s .logm.Higham08() -> (k, m) = (6, 4) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s . logm.Higham08() -> (k, m) = (6, 4) 309s .'x' has negative real eigenvalues; maybe ok for sqrtm() 309s logm.Higham08() -> (k, m) = (7, 3) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s . 309s n = 11 : logm.Higham08() -> (k, m) = (6, 4) 309s . logm.Higham08() -> (k, m) = (6, 5) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s .logm.Higham08() -> (k, m) = (6, 4) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s . logm.Higham08() -> (k, m) = (6, 4) 309s . logm.Higham08() -> (k, m) = (6, 4) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s . logm.Higham08() -> (k, m) = (7, 3) 309s .'x' has negative real eigenvalues; maybe ok for sqrtm() 309s logm.Higham08() -> (k, m) = (7, 3) 309s .'x' has negative real eigenvalues; maybe ok for sqrtm() 309s logm.Higham08() -> (k, m) = (6, 4) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s . logm.Higham08() -> (k, m) = (7, 3) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s .logm.Higham08() -> (k, m) = (7, 3) 309s 'x' has negative real eigenvalues; maybe ok for sqrtm() 309s . 309s > 309s > showProc.time() 309s Time (user system elapsed): 0.751 0.043 0.813 309s > 309s > 309s > ### CPU-measurements for logm() 309s > options(verbose = FALSE)# printing costs .. 309s > set.seed(5) 309s > if(doExtras) { 309s + n <- 50 309s + sim <- 32 309s + } else { 309s + n <- 21 309s + sim <- 8 309s + } 309s > 309s > cpuT <- numeric(sim) 309s > for(k in seq_len(sim)) { 309s + EA <- expm.Higham08(A <- matrix(rnorm(n^2), n,n)) 309s + cat(".") 309s + cpuT[k] <- system.time(LEA <- logm.Higham08(EA))[1] 309s + stopifnot(all.equal(EA, expm.Higham08(LEA), tolerance=1e-12)) 309s + }; cat("\n") 310s ........ 310s > summary(cpuT) 310s Min. 1st Qu. Median Mean 3rd Qu. Max. 310s 0.03200 0.03275 0.03450 0.03550 0.03725 0.04300 310s > ## cmath-5 {Feb.2009}; Michi's original code: 310s > ## Min. 1st Qu. Median Mean 3rd Qu. Max. 310s > ## 1.794 2.249 2.389 2.388 2.515 2.831 310s > 310s > showProc.time() 310s Time (user system elapsed): 1.063 0 1.066 310s > 310s > 310s 310s R version 4.4.3 (2025-02-28) -- "Trophy Case" 310s Copyright (C) 2025 The R Foundation for Statistical Computing 310s Platform: aarch64-unknown-linux-gnu 310s 310s R is free software and comes with ABSOLUTELY NO WARRANTY. 310s You are welcome to redistribute it under certain conditions. 310s Type 'license()' or 'licence()' for distribution details. 310s 310s R is a collaborative project with many contributors. 310s Type 'contributors()' for more information and 310s 'citation()' on how to cite R or R packages in publications. 310s 310s Type 'demo()' for some demos, 'help()' for on-line help, or 310s 'help.start()' for an HTML browser interface to help. 310s Type 'q()' to quit R. 310s 310s > library(expm) 310s Loading required package: Matrix 311s 311s Attaching package: ‘expm’ 311s 311s > The following object is masked from ‘package:Matrix’: 311s 311s expm 311s 311s 311s > source(system.file("test-tools.R", package= "expm"), keep.source=FALSE) 311s Loading required package: tools 311s > ## -> assertError()... doExtras 311s > doExtras 311s [1] FALSE 311s > 311s > ## Missing REPROTECT(), till 2014-09-03 [because 'A' is *integer*]: 311s > set.seed(17) 311s > n <- 300 311s > A <- matrix(rbinom(n^2, size=1, prob=0.1), n,n) 311s > stopifnot(is.integer(A)) 311s > A2 <- A %^% 2 311s > for(i in 1:100) { 311s + A. <- A %^% 2 311s + if(!isTRUE(all.equal(A2, A.))) 311s + cat("not equal; i=",i,"\n") 311s + } 314s > ## MM: On nb-mm3, I get a different error which shows memory corruption: 314s > ## REAL() can only be applied to a 'numeric', not a 'character' 314s > ## or REAL() can only be applied to a 'numeric', not a 'NULL' 314s > 314s > ## Check that *large* matrices now work 314s > if(FALSE) ## << even m %^% 2 takes > 20 hours (!!!) [but no longer stops early!] 314s + if(doExtras && require("sfsmisc") && 314s + exists("Sys.memGB", "package:sfsmisc", mode="function") && 314s + sfsmisc::Sys.memGB() > 50) { ## seems to need 3 x size(m) 314s + ## 314s + n <- 46341 314s + print(as.integer(n^2))# integer overflow 314s + cat("Creating large matrix 'm' (more than max_int entries):\n ") 314s + print(system.time(m <- diag(x = (1:n)^3, nrow = n))) # 9.1 sec 314s + i <- 1:(n-1) 314s + print(system.time( m[cbind(i,i+1)] <- i )) # 11.3 sec 314s + cat("object.size(m): "); print(object.size(m), units="Gb") 314s + ## 16 Gb (= 17.78 e9 bytes) 314s + ## This __STILL__ takes hours 314s + cat("m %^% 2: "); print(system.time(m2 <- m %^% 2)) 314s + ## user system elapsed 314s + ## 127199.580 9608.373 137236.405 ==> 314s + 314s + cat("m %^% 4: "); print(system.time(m4 <- m %^% 4)) # 314s + } 314s > 314s > 314s autopkgtest [15:30:36]: test run-unit-test: -----------------------] 315s autopkgtest [15:30:37]: test run-unit-test: - - - - - - - - - - results - - - - - - - - - - 315s run-unit-test PASS 315s autopkgtest [15:30:37]: test pkg-r-autopkgtest: preparing testbed 499s autopkgtest [15:33:41]: testbed dpkg architecture: arm64 500s autopkgtest [15:33:42]: testbed apt version: 2.9.33 500s autopkgtest [15:33:42]: @@@@@@@@@@@@@@@@@@@@ test bed setup 500s autopkgtest [15:33:42]: testbed release detected to be: plucky 501s autopkgtest [15:33:43]: updating testbed package index (apt update) 502s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [126 kB] 502s Hit:2 http://ftpmaster.internal/ubuntu plucky InRelease 502s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 502s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 502s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [15.8 kB] 502s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [101 kB] 502s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [404 kB] 503s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 Packages [78.2 kB] 503s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 c-n-f Metadata [1976 B] 503s Get:10 http://ftpmaster.internal/ubuntu plucky-proposed/restricted arm64 c-n-f Metadata [116 B] 503s Get:11 http://ftpmaster.internal/ubuntu plucky-proposed/universe arm64 Packages [346 kB] 503s Get:12 http://ftpmaster.internal/ubuntu plucky-proposed/universe arm64 c-n-f Metadata [15.8 kB] 503s Get:13 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse arm64 Packages [4948 B] 503s Get:14 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse arm64 c-n-f Metadata [572 B] 504s Fetched 1094 kB in 2s (585 kB/s) 505s Reading package lists... 506s Reading package lists... 506s Building dependency tree... 506s Reading state information... 508s Calculating upgrade... 508s Calculating upgrade... 508s The following packages will be upgraded: 508s python3-jinja2 strace 509s 2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 509s Need to get 608 kB of archives. 509s After this operation, 11.3 kB of additional disk space will be used. 509s Get:1 http://ftpmaster.internal/ubuntu plucky/main arm64 strace arm64 6.13+ds-1ubuntu1 [499 kB] 509s Get:2 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-jinja2 all 3.1.5-2ubuntu1 [109 kB] 510s Fetched 608 kB in 1s (578 kB/s) 511s (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 ... 117701 files and directories currently installed.) 511s Preparing to unpack .../strace_6.13+ds-1ubuntu1_arm64.deb ... 511s Unpacking strace (6.13+ds-1ubuntu1) over (6.11-0ubuntu1) ... 511s Preparing to unpack .../python3-jinja2_3.1.5-2ubuntu1_all.deb ... 511s Unpacking python3-jinja2 (3.1.5-2ubuntu1) over (3.1.5-2) ... 511s Setting up python3-jinja2 (3.1.5-2ubuntu1) ... 511s Setting up strace (6.13+ds-1ubuntu1) ... 511s Processing triggers for man-db (2.13.0-1) ... 512s Reading package lists... 513s Building dependency tree... 513s Reading state information... 514s Solving dependencies... 515s The following packages will be REMOVED: 515s libnsl2* libpython3.12-minimal* libpython3.12-stdlib* libpython3.12t64* 515s libunwind8* linux-headers-6.11.0-8* linux-headers-6.11.0-8-generic* 515s linux-image-6.11.0-8-generic* linux-modules-6.11.0-8-generic* 515s linux-tools-6.11.0-8* linux-tools-6.11.0-8-generic* 515s 0 upgraded, 0 newly installed, 11 to remove and 5 not upgraded. 515s After this operation, 267 MB disk space will be freed. 516s (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 ... 117701 files and directories currently installed.) 516s Removing linux-tools-6.11.0-8-generic (6.11.0-8.8) ... 516s Removing linux-tools-6.11.0-8 (6.11.0-8.8) ... 516s Removing libpython3.12t64:arm64 (3.12.9-1) ... 516s Removing libpython3.12-stdlib:arm64 (3.12.9-1) ... 516s Removing libnsl2:arm64 (1.3.0-3build3) ... 516s Removing libpython3.12-minimal:arm64 (3.12.9-1) ... 516s Removing libunwind8:arm64 (1.6.2-3.1) ... 516s Removing linux-headers-6.11.0-8-generic (6.11.0-8.8) ... 516s Removing linux-headers-6.11.0-8 (6.11.0-8.8) ... 518s Removing linux-image-6.11.0-8-generic (6.11.0-8.8) ... 519s I: /boot/vmlinuz.old is now a symlink to vmlinuz-6.14.0-10-generic 519s I: /boot/initrd.img.old is now a symlink to initrd.img-6.14.0-10-generic 519s /etc/kernel/postrm.d/initramfs-tools: 519s update-initramfs: Deleting /boot/initrd.img-6.11.0-8-generic 519s /etc/kernel/postrm.d/zz-flash-kernel: 519s flash-kernel: Kernel 6.11.0-8-generic has been removed. 519s flash-kernel: A higher version (6.14.0-10-generic) is still installed, no reflashing required. 519s /etc/kernel/postrm.d/zz-update-grub: 519s Sourcing file `/etc/default/grub' 519s Sourcing file `/etc/default/grub.d/50-cloudimg-settings.cfg' 519s Generating grub configuration file ... 520s Found linux image: /boot/vmlinuz-6.14.0-10-generic 520s Found initrd image: /boot/initrd.img-6.14.0-10-generic 520s Warning: os-prober will not be executed to detect other bootable partitions. 520s Systems on them will not be added to the GRUB boot configuration. 520s Check GRUB_DISABLE_OS_PROBER documentation entry. 520s Adding boot menu entry for UEFI Firmware Settings ... 520s done 520s Removing linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 521s Processing triggers for libc-bin (2.41-1ubuntu1) ... 521s (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 ... 81650 files and directories currently installed.) 521s Purging configuration files for linux-image-6.11.0-8-generic (6.11.0-8.8) ... 521s Purging configuration files for libpython3.12-minimal:arm64 (3.12.9-1) ... 521s Purging configuration files for linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 521s autopkgtest [15:34:03]: upgrading testbed (apt dist-upgrade and autopurge) 522s Reading package lists... 522s Building dependency tree... 522s Reading state information... 523s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 523s Starting 2 pkgProblemResolver with broken count: 0 523s Done 524s Entering ResolveByKeep 524s 524s Calculating upgrade... 525s The following packages will be upgraded: 525s libc-bin libc-dev-bin libc6 libc6-dev locales 525s 5 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 525s Need to get 9530 kB of archives. 525s After this operation, 0 B of additional disk space will be used. 525s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 libc6-dev arm64 2.41-1ubuntu2 [1750 kB] 527s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 libc-dev-bin arm64 2.41-1ubuntu2 [24.0 kB] 527s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 libc6 arm64 2.41-1ubuntu2 [2910 kB] 531s Get:4 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 libc-bin arm64 2.41-1ubuntu2 [600 kB] 532s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 locales all 2.41-1ubuntu2 [4246 kB] 537s Preconfiguring packages ... 537s Fetched 9530 kB in 12s (826 kB/s) 537s (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 ... 81647 files and directories currently installed.) 537s Preparing to unpack .../libc6-dev_2.41-1ubuntu2_arm64.deb ... 537s Unpacking libc6-dev:arm64 (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 537s Preparing to unpack .../libc-dev-bin_2.41-1ubuntu2_arm64.deb ... 537s Unpacking libc-dev-bin (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 537s Preparing to unpack .../libc6_2.41-1ubuntu2_arm64.deb ... 537s Unpacking libc6:arm64 (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 538s Setting up libc6:arm64 (2.41-1ubuntu2) ... 538s (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 ... 81647 files and directories currently installed.) 538s Preparing to unpack .../libc-bin_2.41-1ubuntu2_arm64.deb ... 538s Unpacking libc-bin (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 538s Setting up libc-bin (2.41-1ubuntu2) ... 538s (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 ... 81647 files and directories currently installed.) 538s Preparing to unpack .../locales_2.41-1ubuntu2_all.deb ... 538s Unpacking locales (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 538s Setting up locales (2.41-1ubuntu2) ... 539s Generating locales (this might take a while)... 541s en_US.UTF-8... done 541s Generation complete. 541s Setting up libc-dev-bin (2.41-1ubuntu2) ... 541s Setting up libc6-dev:arm64 (2.41-1ubuntu2) ... 541s Processing triggers for man-db (2.13.0-1) ... 542s Processing triggers for systemd (257.3-1ubuntu3) ... 543s Reading package lists... 543s Building dependency tree... 543s Reading state information... 544s Starting pkgProblemResolver with broken count: 0 544s Starting 2 pkgProblemResolver with broken count: 0 544s Done 544s Solving dependencies... 545s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 545s autopkgtest [15:34:27]: rebooting testbed after setup commands that affected boot 572s Reading package lists... 572s Building dependency tree... 572s Reading state information... 573s Starting pkgProblemResolver with broken count: 0 573s Starting 2 pkgProblemResolver with broken count: 0 573s Done 574s The following NEW packages will be installed: 574s build-essential cpp cpp-14 cpp-14-aarch64-linux-gnu cpp-aarch64-linux-gnu 574s dctrl-tools fontconfig fontconfig-config fonts-dejavu-core fonts-dejavu-mono 574s g++ g++-14 g++-14-aarch64-linux-gnu g++-aarch64-linux-gnu gcc gcc-14 574s gcc-14-aarch64-linux-gnu gcc-aarch64-linux-gnu gfortran gfortran-14 574s gfortran-14-aarch64-linux-gnu gfortran-aarch64-linux-gnu icu-devtools 574s libasan8 libblas-dev libblas3 libbz2-dev libcairo2 libcc1-0 libdatrie1 574s libdeflate-dev libdeflate0 libfontconfig1 libgcc-14-dev libgfortran-14-dev 574s libgfortran5 libgomp1 libgraphite2-3 libharfbuzz0b libhwasan0 libice6 574s libicu-dev libisl23 libitm1 libjbig0 libjpeg-dev libjpeg-turbo8 574s libjpeg-turbo8-dev libjpeg8 libjpeg8-dev liblapack-dev liblapack3 liblerc4 574s liblsan0 liblzma-dev libmpc3 libncurses-dev libpango-1.0-0 574s libpangocairo-1.0-0 libpangoft2-1.0-0 libpaper-utils libpaper2 libpcre2-16-0 574s libpcre2-32-0 libpcre2-dev libpcre2-posix3 libpixman-1-0 libpkgconf3 574s libpng-dev libreadline-dev libsharpyuv0 libsm6 libstdc++-14-dev libtcl8.6 574s libthai-data libthai0 libtiff6 libtirpc-dev libtk8.6 libtsan2 libubsan1 574s libwebp7 libxcb-render0 libxcb-shm0 libxft2 libxrender1 libxss1 libxt6t64 574s pkg-r-autopkgtest pkgconf pkgconf-bin r-base-core r-base-dev r-cran-expm 574s r-cran-lattice r-cran-matrix r-cran-rcolorbrewer r-cran-sfsmisc unzip 574s x11-common xdg-utils zip zlib1g-dev 574s 0 upgraded, 103 newly installed, 0 to remove and 0 not upgraded. 574s Need to get 137 MB of archives. 574s After this operation, 424 MB of additional disk space will be used. 574s Get:1 http://ftpmaster.internal/ubuntu plucky/main arm64 libisl23 arm64 0.27-1 [676 kB] 575s Get:2 http://ftpmaster.internal/ubuntu plucky/main arm64 libmpc3 arm64 1.3.1-1build2 [56.8 kB] 575s Get:3 http://ftpmaster.internal/ubuntu plucky/main arm64 cpp-14-aarch64-linux-gnu arm64 14.2.0-17ubuntu3 [10.6 MB] 587s Get:4 http://ftpmaster.internal/ubuntu plucky/main arm64 cpp-14 arm64 14.2.0-17ubuntu3 [1028 B] 587s Get:5 http://ftpmaster.internal/ubuntu plucky/main arm64 cpp-aarch64-linux-gnu arm64 4:14.2.0-1ubuntu1 [5558 B] 587s Get:6 http://ftpmaster.internal/ubuntu plucky/main arm64 cpp arm64 4:14.2.0-1ubuntu1 [22.4 kB] 587s Get:7 http://ftpmaster.internal/ubuntu plucky/main arm64 libcc1-0 arm64 15-20250222-0ubuntu1 [44.2 kB] 587s Get:8 http://ftpmaster.internal/ubuntu plucky/main arm64 libgomp1 arm64 15-20250222-0ubuntu1 [146 kB] 587s Get:9 http://ftpmaster.internal/ubuntu plucky/main arm64 libitm1 arm64 15-20250222-0ubuntu1 [28.0 kB] 587s Get:10 http://ftpmaster.internal/ubuntu plucky/main arm64 libasan8 arm64 15-20250222-0ubuntu1 [2924 kB] 590s Get:11 http://ftpmaster.internal/ubuntu plucky/main arm64 liblsan0 arm64 15-20250222-0ubuntu1 [1319 kB] 592s Get:12 http://ftpmaster.internal/ubuntu plucky/main arm64 libtsan2 arm64 15-20250222-0ubuntu1 [2694 kB] 595s Get:13 http://ftpmaster.internal/ubuntu plucky/main arm64 libubsan1 arm64 15-20250222-0ubuntu1 [1178 kB] 596s Get:14 http://ftpmaster.internal/ubuntu plucky/main arm64 libhwasan0 arm64 15-20250222-0ubuntu1 [1642 kB] 597s Get:15 http://ftpmaster.internal/ubuntu plucky/main arm64 libgcc-14-dev arm64 14.2.0-17ubuntu3 [2593 kB] 600s Get:16 http://ftpmaster.internal/ubuntu plucky/main arm64 gcc-14-aarch64-linux-gnu arm64 14.2.0-17ubuntu3 [20.9 MB] 624s Get:17 http://ftpmaster.internal/ubuntu plucky/main arm64 gcc-14 arm64 14.2.0-17ubuntu3 [526 kB] 625s Get:18 http://ftpmaster.internal/ubuntu plucky/main arm64 gcc-aarch64-linux-gnu arm64 4:14.2.0-1ubuntu1 [1200 B] 625s Get:19 http://ftpmaster.internal/ubuntu plucky/main arm64 gcc arm64 4:14.2.0-1ubuntu1 [4998 B] 625s Get:20 http://ftpmaster.internal/ubuntu plucky/main arm64 libstdc++-14-dev arm64 14.2.0-17ubuntu3 [2499 kB] 627s Get:21 http://ftpmaster.internal/ubuntu plucky/main arm64 g++-14-aarch64-linux-gnu arm64 14.2.0-17ubuntu3 [12.1 MB] 642s Get:22 http://ftpmaster.internal/ubuntu plucky/main arm64 g++-14 arm64 14.2.0-17ubuntu3 [21.8 kB] 642s Get:23 http://ftpmaster.internal/ubuntu plucky/main arm64 g++-aarch64-linux-gnu arm64 4:14.2.0-1ubuntu1 [956 B] 642s Get:24 http://ftpmaster.internal/ubuntu plucky/main arm64 g++ arm64 4:14.2.0-1ubuntu1 [1080 B] 642s Get:25 http://ftpmaster.internal/ubuntu plucky/main arm64 build-essential arm64 12.10ubuntu1 [4932 B] 642s Get:26 http://ftpmaster.internal/ubuntu plucky/main arm64 dctrl-tools arm64 2.24-3build3 [103 kB] 642s Get:27 http://ftpmaster.internal/ubuntu plucky/main arm64 fonts-dejavu-mono all 2.37-8 [502 kB] 642s Get:28 http://ftpmaster.internal/ubuntu plucky/main arm64 fonts-dejavu-core all 2.37-8 [835 kB] 643s Get:29 http://ftpmaster.internal/ubuntu plucky/main arm64 fontconfig-config arm64 2.15.0-2ubuntu1 [37.5 kB] 643s Get:30 http://ftpmaster.internal/ubuntu plucky/main arm64 libfontconfig1 arm64 2.15.0-2ubuntu1 [144 kB] 644s Get:31 http://ftpmaster.internal/ubuntu plucky/main arm64 fontconfig arm64 2.15.0-2ubuntu1 [191 kB] 644s Get:32 http://ftpmaster.internal/ubuntu plucky/main arm64 libgfortran5 arm64 15-20250222-0ubuntu1 [444 kB] 644s Get:33 http://ftpmaster.internal/ubuntu plucky/main arm64 libgfortran-14-dev arm64 14.2.0-17ubuntu3 [498 kB] 645s Get:34 http://ftpmaster.internal/ubuntu plucky/main arm64 gfortran-14-aarch64-linux-gnu arm64 14.2.0-17ubuntu3 [11.4 MB] 658s Get:35 http://ftpmaster.internal/ubuntu plucky/main arm64 gfortran-14 arm64 14.2.0-17ubuntu3 [13.6 kB] 658s Get:36 http://ftpmaster.internal/ubuntu plucky/main arm64 gfortran-aarch64-linux-gnu arm64 4:14.2.0-1ubuntu1 [1022 B] 658s Get:37 http://ftpmaster.internal/ubuntu plucky/main arm64 gfortran arm64 4:14.2.0-1ubuntu1 [1166 B] 658s Get:38 http://ftpmaster.internal/ubuntu plucky/main arm64 icu-devtools arm64 76.1-1ubuntu2 [213 kB] 658s Get:39 http://ftpmaster.internal/ubuntu plucky/main arm64 libblas3 arm64 3.12.1-2 [161 kB] 658s Get:40 http://ftpmaster.internal/ubuntu plucky/main arm64 libblas-dev arm64 3.12.1-2 [126 kB] 658s Get:41 http://ftpmaster.internal/ubuntu plucky/main arm64 libbz2-dev arm64 1.0.8-6 [36.1 kB] 658s Get:42 http://ftpmaster.internal/ubuntu plucky/main arm64 libpixman-1-0 arm64 0.44.0-3 [197 kB] 658s Get:43 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-render0 arm64 1.17.0-2 [16.6 kB] 659s Get:44 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-shm0 arm64 1.17.0-2 [5884 B] 659s Get:45 http://ftpmaster.internal/ubuntu plucky/main arm64 libxrender1 arm64 1:0.9.10-1.1build1 [18.8 kB] 659s Get:46 http://ftpmaster.internal/ubuntu plucky/main arm64 libcairo2 arm64 1.18.2-2 [560 kB] 659s Get:47 http://ftpmaster.internal/ubuntu plucky/main arm64 libdatrie1 arm64 0.2.13-3build1 [19.2 kB] 659s Get:48 http://ftpmaster.internal/ubuntu plucky/main arm64 libdeflate0 arm64 1.23-1 [46.2 kB] 659s Get:49 http://ftpmaster.internal/ubuntu plucky/main arm64 libdeflate-dev arm64 1.23-1 [53.7 kB] 659s Get:50 http://ftpmaster.internal/ubuntu plucky/main arm64 libgraphite2-3 arm64 1.3.14-2ubuntu1 [70.6 kB] 659s Get:51 http://ftpmaster.internal/ubuntu plucky/main arm64 libharfbuzz0b arm64 10.2.0-1 [490 kB] 660s Get:52 http://ftpmaster.internal/ubuntu plucky/main arm64 x11-common all 1:7.7+23ubuntu3 [21.7 kB] 660s Get:53 http://ftpmaster.internal/ubuntu plucky/main arm64 libice6 arm64 2:1.1.1-1 [42.3 kB] 660s Get:54 http://ftpmaster.internal/ubuntu plucky/main arm64 libicu-dev arm64 76.1-1ubuntu2 [12.2 MB] 674s Get:55 http://ftpmaster.internal/ubuntu plucky/main arm64 libjpeg-turbo8 arm64 2.1.5-3ubuntu2 [165 kB] 674s Get:56 http://ftpmaster.internal/ubuntu plucky/main arm64 libjpeg-turbo8-dev arm64 2.1.5-3ubuntu2 [306 kB] 674s Get:57 http://ftpmaster.internal/ubuntu plucky/main arm64 libjpeg8 arm64 8c-2ubuntu11 [2148 B] 674s Get:58 http://ftpmaster.internal/ubuntu plucky/main arm64 libjpeg8-dev arm64 8c-2ubuntu11 [1484 B] 674s Get:59 http://ftpmaster.internal/ubuntu plucky/main arm64 libjpeg-dev arm64 8c-2ubuntu11 [1482 B] 674s Get:60 http://ftpmaster.internal/ubuntu plucky/main arm64 liblapack3 arm64 3.12.1-2 [2307 kB] 676s Get:61 http://ftpmaster.internal/ubuntu plucky/main arm64 liblapack-dev arm64 3.12.1-2 [4439 kB] 681s Get:62 http://ftpmaster.internal/ubuntu plucky/main arm64 liblerc4 arm64 4.0.0+ds-5ubuntu1 [167 kB] 682s Get:63 http://ftpmaster.internal/ubuntu plucky/main arm64 libncurses-dev arm64 6.5+20250216-2 [389 kB] 682s Get:64 http://ftpmaster.internal/ubuntu plucky/main arm64 libthai-data all 0.1.29-2build1 [158 kB] 682s Get:65 http://ftpmaster.internal/ubuntu plucky/main arm64 libthai0 arm64 0.1.29-2build1 [18.2 kB] 682s Get:66 http://ftpmaster.internal/ubuntu plucky/main arm64 libpango-1.0-0 arm64 1.56.2-1 [237 kB] 682s Get:67 http://ftpmaster.internal/ubuntu plucky/main arm64 libpangoft2-1.0-0 arm64 1.56.2-1 [49.5 kB] 683s Get:68 http://ftpmaster.internal/ubuntu plucky/main arm64 libpangocairo-1.0-0 arm64 1.56.2-1 [27.6 kB] 683s Get:69 http://ftpmaster.internal/ubuntu plucky/main arm64 libpaper2 arm64 2.2.5-0.3 [17.3 kB] 683s Get:70 http://ftpmaster.internal/ubuntu plucky/main arm64 libpaper-utils arm64 2.2.5-0.3 [15.4 kB] 683s Get:71 http://ftpmaster.internal/ubuntu plucky/main arm64 libpcre2-16-0 arm64 10.45-1 [222 kB] 683s Get:72 http://ftpmaster.internal/ubuntu plucky/main arm64 libpcre2-32-0 arm64 10.45-1 [210 kB] 683s Get:73 http://ftpmaster.internal/ubuntu plucky/main arm64 libpcre2-posix3 arm64 10.45-1 [7084 B] 683s Get:74 http://ftpmaster.internal/ubuntu plucky/main arm64 libpcre2-dev arm64 10.45-1 [768 kB] 684s Get:75 http://ftpmaster.internal/ubuntu plucky/main arm64 libpkgconf3 arm64 1.8.1-4 [31.4 kB] 684s Get:76 http://ftpmaster.internal/ubuntu plucky/main arm64 zlib1g-dev arm64 1:1.3.dfsg+really1.3.1-1ubuntu1 [894 kB] 685s Get:77 http://ftpmaster.internal/ubuntu plucky/main arm64 libpng-dev arm64 1.6.47-1 [269 kB] 685s Get:78 http://ftpmaster.internal/ubuntu plucky/main arm64 libreadline-dev arm64 8.2-6 [179 kB] 685s Get:79 http://ftpmaster.internal/ubuntu plucky/main arm64 libsharpyuv0 arm64 1.5.0-0.1 [16.9 kB] 685s Get:80 http://ftpmaster.internal/ubuntu plucky/main arm64 libsm6 arm64 2:1.2.4-1 [16.4 kB] 685s Get:81 http://ftpmaster.internal/ubuntu plucky/main arm64 libtcl8.6 arm64 8.6.16+dfsg-1 [987 kB] 686s Get:82 http://ftpmaster.internal/ubuntu plucky/main arm64 libjbig0 arm64 2.1-6.1ubuntu2 [29.3 kB] 686s Get:83 http://ftpmaster.internal/ubuntu plucky/main arm64 libwebp7 arm64 1.5.0-0.1 [194 kB] 686s Get:84 http://ftpmaster.internal/ubuntu plucky/main arm64 libtiff6 arm64 4.5.1+git230720-4ubuntu4 [193 kB] 687s Get:85 http://ftpmaster.internal/ubuntu plucky/main arm64 libxft2 arm64 2.3.6-1build1 [44.1 kB] 687s Get:86 http://ftpmaster.internal/ubuntu plucky/main arm64 libxss1 arm64 1:1.2.3-1build3 [7244 B] 687s Get:87 http://ftpmaster.internal/ubuntu plucky/main arm64 libtk8.6 arm64 8.6.16-1 [776 kB] 687s Get:88 http://ftpmaster.internal/ubuntu plucky/main arm64 libxt6t64 arm64 1:1.2.1-1.2build1 [168 kB] 688s Get:89 http://ftpmaster.internal/ubuntu plucky/main arm64 zip arm64 3.0-14ubuntu2 [173 kB] 688s Get:90 http://ftpmaster.internal/ubuntu plucky/main arm64 unzip arm64 6.0-28ubuntu6 [178 kB] 688s Get:91 http://ftpmaster.internal/ubuntu plucky/main arm64 xdg-utils all 1.2.1-2ubuntu1 [66.0 kB] 688s Get:92 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-base-core arm64 4.4.3-1 [28.4 MB] 723s Get:93 http://ftpmaster.internal/ubuntu plucky/main arm64 liblzma-dev arm64 5.6.4-1 [180 kB] 723s Get:94 http://ftpmaster.internal/ubuntu plucky/main arm64 pkgconf-bin arm64 1.8.1-4 [20.9 kB] 723s Get:95 http://ftpmaster.internal/ubuntu plucky/main arm64 pkgconf arm64 1.8.1-4 [16.7 kB] 723s Get:96 http://ftpmaster.internal/ubuntu plucky/main arm64 libtirpc-dev arm64 1.3.4+ds-1.3 [201 kB] 723s Get:97 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-base-dev all 4.4.3-1 [4176 B] 723s Get:98 http://ftpmaster.internal/ubuntu plucky/universe arm64 pkg-r-autopkgtest all 20231212ubuntu1 [6448 B] 723s Get:99 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-lattice arm64 0.22-6-1 [1363 kB] 725s Get:100 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-matrix arm64 1.7-3-1 [4045 kB] 729s Get:101 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-expm arm64 1.0-0-1 [225 kB] 730s Get:102 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-rcolorbrewer all 1.1-3-1build1 [55.4 kB] 730s Get:103 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-sfsmisc all 1.1-20-1 [674 kB] 731s Preconfiguring packages ... 731s Fetched 137 MB in 2min 37s (875 kB/s) 732s Selecting previously unselected package libisl23:arm64. 732s (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 ... 81647 files and directories currently installed.) 732s Preparing to unpack .../000-libisl23_0.27-1_arm64.deb ... 732s Unpacking libisl23:arm64 (0.27-1) ... 732s Selecting previously unselected package libmpc3:arm64. 732s Preparing to unpack .../001-libmpc3_1.3.1-1build2_arm64.deb ... 732s Unpacking libmpc3:arm64 (1.3.1-1build2) ... 732s Selecting previously unselected package cpp-14-aarch64-linux-gnu. 732s Preparing to unpack .../002-cpp-14-aarch64-linux-gnu_14.2.0-17ubuntu3_arm64.deb ... 732s Unpacking cpp-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 732s Selecting previously unselected package cpp-14. 732s Preparing to unpack .../003-cpp-14_14.2.0-17ubuntu3_arm64.deb ... 732s Unpacking cpp-14 (14.2.0-17ubuntu3) ... 732s Selecting previously unselected package cpp-aarch64-linux-gnu. 732s Preparing to unpack .../004-cpp-aarch64-linux-gnu_4%3a14.2.0-1ubuntu1_arm64.deb ... 732s Unpacking cpp-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 732s Selecting previously unselected package cpp. 732s Preparing to unpack .../005-cpp_4%3a14.2.0-1ubuntu1_arm64.deb ... 732s Unpacking cpp (4:14.2.0-1ubuntu1) ... 732s Selecting previously unselected package libcc1-0:arm64. 732s Preparing to unpack .../006-libcc1-0_15-20250222-0ubuntu1_arm64.deb ... 732s Unpacking libcc1-0:arm64 (15-20250222-0ubuntu1) ... 732s Selecting previously unselected package libgomp1:arm64. 732s Preparing to unpack .../007-libgomp1_15-20250222-0ubuntu1_arm64.deb ... 732s Unpacking libgomp1:arm64 (15-20250222-0ubuntu1) ... 732s Selecting previously unselected package libitm1:arm64. 732s Preparing to unpack .../008-libitm1_15-20250222-0ubuntu1_arm64.deb ... 732s Unpacking libitm1:arm64 (15-20250222-0ubuntu1) ... 732s Selecting previously unselected package libasan8:arm64. 732s Preparing to unpack .../009-libasan8_15-20250222-0ubuntu1_arm64.deb ... 732s Unpacking libasan8:arm64 (15-20250222-0ubuntu1) ... 732s Selecting previously unselected package liblsan0:arm64. 732s Preparing to unpack .../010-liblsan0_15-20250222-0ubuntu1_arm64.deb ... 732s Unpacking liblsan0:arm64 (15-20250222-0ubuntu1) ... 732s Selecting previously unselected package libtsan2:arm64. 732s Preparing to unpack .../011-libtsan2_15-20250222-0ubuntu1_arm64.deb ... 732s Unpacking libtsan2:arm64 (15-20250222-0ubuntu1) ... 733s Selecting previously unselected package libubsan1:arm64. 733s Preparing to unpack .../012-libubsan1_15-20250222-0ubuntu1_arm64.deb ... 733s Unpacking libubsan1:arm64 (15-20250222-0ubuntu1) ... 733s Selecting previously unselected package libhwasan0:arm64. 733s Preparing to unpack .../013-libhwasan0_15-20250222-0ubuntu1_arm64.deb ... 733s Unpacking libhwasan0:arm64 (15-20250222-0ubuntu1) ... 733s Selecting previously unselected package libgcc-14-dev:arm64. 733s Preparing to unpack .../014-libgcc-14-dev_14.2.0-17ubuntu3_arm64.deb ... 733s Unpacking libgcc-14-dev:arm64 (14.2.0-17ubuntu3) ... 733s Selecting previously unselected package gcc-14-aarch64-linux-gnu. 733s Preparing to unpack .../015-gcc-14-aarch64-linux-gnu_14.2.0-17ubuntu3_arm64.deb ... 733s Unpacking gcc-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 733s Selecting previously unselected package gcc-14. 733s Preparing to unpack .../016-gcc-14_14.2.0-17ubuntu3_arm64.deb ... 733s Unpacking gcc-14 (14.2.0-17ubuntu3) ... 733s Selecting previously unselected package gcc-aarch64-linux-gnu. 733s Preparing to unpack .../017-gcc-aarch64-linux-gnu_4%3a14.2.0-1ubuntu1_arm64.deb ... 733s Unpacking gcc-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 733s Selecting previously unselected package gcc. 733s Preparing to unpack .../018-gcc_4%3a14.2.0-1ubuntu1_arm64.deb ... 733s Unpacking gcc (4:14.2.0-1ubuntu1) ... 733s Selecting previously unselected package libstdc++-14-dev:arm64. 733s Preparing to unpack .../019-libstdc++-14-dev_14.2.0-17ubuntu3_arm64.deb ... 733s Unpacking libstdc++-14-dev:arm64 (14.2.0-17ubuntu3) ... 733s Selecting previously unselected package g++-14-aarch64-linux-gnu. 733s Preparing to unpack .../020-g++-14-aarch64-linux-gnu_14.2.0-17ubuntu3_arm64.deb ... 733s Unpacking g++-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 734s Selecting previously unselected package g++-14. 734s Preparing to unpack .../021-g++-14_14.2.0-17ubuntu3_arm64.deb ... 734s Unpacking g++-14 (14.2.0-17ubuntu3) ... 734s Selecting previously unselected package g++-aarch64-linux-gnu. 734s Preparing to unpack .../022-g++-aarch64-linux-gnu_4%3a14.2.0-1ubuntu1_arm64.deb ... 734s Unpacking g++-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 734s Selecting previously unselected package g++. 734s Preparing to unpack .../023-g++_4%3a14.2.0-1ubuntu1_arm64.deb ... 734s Unpacking g++ (4:14.2.0-1ubuntu1) ... 734s Selecting previously unselected package build-essential. 734s Preparing to unpack .../024-build-essential_12.10ubuntu1_arm64.deb ... 734s Unpacking build-essential (12.10ubuntu1) ... 734s Selecting previously unselected package dctrl-tools. 734s Preparing to unpack .../025-dctrl-tools_2.24-3build3_arm64.deb ... 734s Unpacking dctrl-tools (2.24-3build3) ... 734s Selecting previously unselected package fonts-dejavu-mono. 734s Preparing to unpack .../026-fonts-dejavu-mono_2.37-8_all.deb ... 734s Unpacking fonts-dejavu-mono (2.37-8) ... 734s Selecting previously unselected package fonts-dejavu-core. 734s Preparing to unpack .../027-fonts-dejavu-core_2.37-8_all.deb ... 734s Unpacking fonts-dejavu-core (2.37-8) ... 734s Selecting previously unselected package fontconfig-config. 734s Preparing to unpack .../028-fontconfig-config_2.15.0-2ubuntu1_arm64.deb ... 734s Unpacking fontconfig-config (2.15.0-2ubuntu1) ... 734s Selecting previously unselected package libfontconfig1:arm64. 734s Preparing to unpack .../029-libfontconfig1_2.15.0-2ubuntu1_arm64.deb ... 734s Unpacking libfontconfig1:arm64 (2.15.0-2ubuntu1) ... 734s Selecting previously unselected package fontconfig. 734s Preparing to unpack .../030-fontconfig_2.15.0-2ubuntu1_arm64.deb ... 734s Unpacking fontconfig (2.15.0-2ubuntu1) ... 734s Selecting previously unselected package libgfortran5:arm64. 734s Preparing to unpack .../031-libgfortran5_15-20250222-0ubuntu1_arm64.deb ... 734s Unpacking libgfortran5:arm64 (15-20250222-0ubuntu1) ... 734s Selecting previously unselected package libgfortran-14-dev:arm64. 734s Preparing to unpack .../032-libgfortran-14-dev_14.2.0-17ubuntu3_arm64.deb ... 734s Unpacking libgfortran-14-dev:arm64 (14.2.0-17ubuntu3) ... 734s Selecting previously unselected package gfortran-14-aarch64-linux-gnu. 735s Preparing to unpack .../033-gfortran-14-aarch64-linux-gnu_14.2.0-17ubuntu3_arm64.deb ... 735s Unpacking gfortran-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 735s Selecting previously unselected package gfortran-14. 735s Preparing to unpack .../034-gfortran-14_14.2.0-17ubuntu3_arm64.deb ... 735s Unpacking gfortran-14 (14.2.0-17ubuntu3) ... 735s Selecting previously unselected package gfortran-aarch64-linux-gnu. 735s Preparing to unpack .../035-gfortran-aarch64-linux-gnu_4%3a14.2.0-1ubuntu1_arm64.deb ... 735s Unpacking gfortran-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 735s Selecting previously unselected package gfortran. 735s Preparing to unpack .../036-gfortran_4%3a14.2.0-1ubuntu1_arm64.deb ... 735s Unpacking gfortran (4:14.2.0-1ubuntu1) ... 735s Selecting previously unselected package icu-devtools. 735s Preparing to unpack .../037-icu-devtools_76.1-1ubuntu2_arm64.deb ... 735s Unpacking icu-devtools (76.1-1ubuntu2) ... 735s Selecting previously unselected package libblas3:arm64. 735s Preparing to unpack .../038-libblas3_3.12.1-2_arm64.deb ... 735s Unpacking libblas3:arm64 (3.12.1-2) ... 735s Selecting previously unselected package libblas-dev:arm64. 735s Preparing to unpack .../039-libblas-dev_3.12.1-2_arm64.deb ... 735s Unpacking libblas-dev:arm64 (3.12.1-2) ... 735s Selecting previously unselected package libbz2-dev:arm64. 735s Preparing to unpack .../040-libbz2-dev_1.0.8-6_arm64.deb ... 735s Unpacking libbz2-dev:arm64 (1.0.8-6) ... 735s Selecting previously unselected package libpixman-1-0:arm64. 735s Preparing to unpack .../041-libpixman-1-0_0.44.0-3_arm64.deb ... 735s Unpacking libpixman-1-0:arm64 (0.44.0-3) ... 735s Selecting previously unselected package libxcb-render0:arm64. 735s Preparing to unpack .../042-libxcb-render0_1.17.0-2_arm64.deb ... 735s Unpacking libxcb-render0:arm64 (1.17.0-2) ... 735s Selecting previously unselected package libxcb-shm0:arm64. 735s Preparing to unpack .../043-libxcb-shm0_1.17.0-2_arm64.deb ... 735s Unpacking libxcb-shm0:arm64 (1.17.0-2) ... 735s Selecting previously unselected package libxrender1:arm64. 735s Preparing to unpack .../044-libxrender1_1%3a0.9.10-1.1build1_arm64.deb ... 735s Unpacking libxrender1:arm64 (1:0.9.10-1.1build1) ... 735s Selecting previously unselected package libcairo2:arm64. 735s Preparing to unpack .../045-libcairo2_1.18.2-2_arm64.deb ... 735s Unpacking libcairo2:arm64 (1.18.2-2) ... 735s Selecting previously unselected package libdatrie1:arm64. 735s Preparing to unpack .../046-libdatrie1_0.2.13-3build1_arm64.deb ... 735s Unpacking libdatrie1:arm64 (0.2.13-3build1) ... 735s Selecting previously unselected package libdeflate0:arm64. 735s Preparing to unpack .../047-libdeflate0_1.23-1_arm64.deb ... 735s Unpacking libdeflate0:arm64 (1.23-1) ... 735s Selecting previously unselected package libdeflate-dev:arm64. 735s Preparing to unpack .../048-libdeflate-dev_1.23-1_arm64.deb ... 735s Unpacking libdeflate-dev:arm64 (1.23-1) ... 735s Selecting previously unselected package libgraphite2-3:arm64. 735s Preparing to unpack .../049-libgraphite2-3_1.3.14-2ubuntu1_arm64.deb ... 735s Unpacking libgraphite2-3:arm64 (1.3.14-2ubuntu1) ... 735s Selecting previously unselected package libharfbuzz0b:arm64. 735s Preparing to unpack .../050-libharfbuzz0b_10.2.0-1_arm64.deb ... 735s Unpacking libharfbuzz0b:arm64 (10.2.0-1) ... 735s Selecting previously unselected package x11-common. 735s Preparing to unpack .../051-x11-common_1%3a7.7+23ubuntu3_all.deb ... 735s Unpacking x11-common (1:7.7+23ubuntu3) ... 735s Selecting previously unselected package libice6:arm64. 735s Preparing to unpack .../052-libice6_2%3a1.1.1-1_arm64.deb ... 735s Unpacking libice6:arm64 (2:1.1.1-1) ... 735s Selecting previously unselected package libicu-dev:arm64. 735s Preparing to unpack .../053-libicu-dev_76.1-1ubuntu2_arm64.deb ... 735s Unpacking libicu-dev:arm64 (76.1-1ubuntu2) ... 736s Selecting previously unselected package libjpeg-turbo8:arm64. 736s Preparing to unpack .../054-libjpeg-turbo8_2.1.5-3ubuntu2_arm64.deb ... 736s Unpacking libjpeg-turbo8:arm64 (2.1.5-3ubuntu2) ... 736s Selecting previously unselected package libjpeg-turbo8-dev:arm64. 736s Preparing to unpack .../055-libjpeg-turbo8-dev_2.1.5-3ubuntu2_arm64.deb ... 736s Unpacking libjpeg-turbo8-dev:arm64 (2.1.5-3ubuntu2) ... 736s Selecting previously unselected package libjpeg8:arm64. 736s Preparing to unpack .../056-libjpeg8_8c-2ubuntu11_arm64.deb ... 736s Unpacking libjpeg8:arm64 (8c-2ubuntu11) ... 736s Selecting previously unselected package libjpeg8-dev:arm64. 736s Preparing to unpack .../057-libjpeg8-dev_8c-2ubuntu11_arm64.deb ... 736s Unpacking libjpeg8-dev:arm64 (8c-2ubuntu11) ... 736s Selecting previously unselected package libjpeg-dev:arm64. 736s Preparing to unpack .../058-libjpeg-dev_8c-2ubuntu11_arm64.deb ... 736s Unpacking libjpeg-dev:arm64 (8c-2ubuntu11) ... 736s Selecting previously unselected package liblapack3:arm64. 736s Preparing to unpack .../059-liblapack3_3.12.1-2_arm64.deb ... 736s Unpacking liblapack3:arm64 (3.12.1-2) ... 736s Selecting previously unselected package liblapack-dev:arm64. 736s Preparing to unpack .../060-liblapack-dev_3.12.1-2_arm64.deb ... 736s Unpacking liblapack-dev:arm64 (3.12.1-2) ... 736s Selecting previously unselected package liblerc4:arm64. 736s Preparing to unpack .../061-liblerc4_4.0.0+ds-5ubuntu1_arm64.deb ... 736s Unpacking liblerc4:arm64 (4.0.0+ds-5ubuntu1) ... 736s Selecting previously unselected package libncurses-dev:arm64. 736s Preparing to unpack .../062-libncurses-dev_6.5+20250216-2_arm64.deb ... 736s Unpacking libncurses-dev:arm64 (6.5+20250216-2) ... 736s Selecting previously unselected package libthai-data. 736s Preparing to unpack .../063-libthai-data_0.1.29-2build1_all.deb ... 736s Unpacking libthai-data (0.1.29-2build1) ... 736s Selecting previously unselected package libthai0:arm64. 736s Preparing to unpack .../064-libthai0_0.1.29-2build1_arm64.deb ... 736s Unpacking libthai0:arm64 (0.1.29-2build1) ... 736s Selecting previously unselected package libpango-1.0-0:arm64. 736s Preparing to unpack .../065-libpango-1.0-0_1.56.2-1_arm64.deb ... 736s Unpacking libpango-1.0-0:arm64 (1.56.2-1) ... 736s Selecting previously unselected package libpangoft2-1.0-0:arm64. 736s Preparing to unpack .../066-libpangoft2-1.0-0_1.56.2-1_arm64.deb ... 736s Unpacking libpangoft2-1.0-0:arm64 (1.56.2-1) ... 736s Selecting previously unselected package libpangocairo-1.0-0:arm64. 736s Preparing to unpack .../067-libpangocairo-1.0-0_1.56.2-1_arm64.deb ... 736s Unpacking libpangocairo-1.0-0:arm64 (1.56.2-1) ... 736s Selecting previously unselected package libpaper2:arm64. 736s Preparing to unpack .../068-libpaper2_2.2.5-0.3_arm64.deb ... 736s Unpacking libpaper2:arm64 (2.2.5-0.3) ... 736s Selecting previously unselected package libpaper-utils. 737s Preparing to unpack .../069-libpaper-utils_2.2.5-0.3_arm64.deb ... 737s Unpacking libpaper-utils (2.2.5-0.3) ... 737s Selecting previously unselected package libpcre2-16-0:arm64. 737s Preparing to unpack .../070-libpcre2-16-0_10.45-1_arm64.deb ... 737s Unpacking libpcre2-16-0:arm64 (10.45-1) ... 737s Selecting previously unselected package libpcre2-32-0:arm64. 737s Preparing to unpack .../071-libpcre2-32-0_10.45-1_arm64.deb ... 737s Unpacking libpcre2-32-0:arm64 (10.45-1) ... 737s Selecting previously unselected package libpcre2-posix3:arm64. 737s Preparing to unpack .../072-libpcre2-posix3_10.45-1_arm64.deb ... 737s Unpacking libpcre2-posix3:arm64 (10.45-1) ... 737s Selecting previously unselected package libpcre2-dev:arm64. 737s Preparing to unpack .../073-libpcre2-dev_10.45-1_arm64.deb ... 737s Unpacking libpcre2-dev:arm64 (10.45-1) ... 737s Selecting previously unselected package libpkgconf3:arm64. 737s Preparing to unpack .../074-libpkgconf3_1.8.1-4_arm64.deb ... 737s Unpacking libpkgconf3:arm64 (1.8.1-4) ... 737s Selecting previously unselected package zlib1g-dev:arm64. 737s Preparing to unpack .../075-zlib1g-dev_1%3a1.3.dfsg+really1.3.1-1ubuntu1_arm64.deb ... 737s Unpacking zlib1g-dev:arm64 (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 737s Selecting previously unselected package libpng-dev:arm64. 737s Preparing to unpack .../076-libpng-dev_1.6.47-1_arm64.deb ... 737s Unpacking libpng-dev:arm64 (1.6.47-1) ... 737s Selecting previously unselected package libreadline-dev:arm64. 737s Preparing to unpack .../077-libreadline-dev_8.2-6_arm64.deb ... 737s Unpacking libreadline-dev:arm64 (8.2-6) ... 737s Selecting previously unselected package libsharpyuv0:arm64. 737s Preparing to unpack .../078-libsharpyuv0_1.5.0-0.1_arm64.deb ... 737s Unpacking libsharpyuv0:arm64 (1.5.0-0.1) ... 737s Selecting previously unselected package libsm6:arm64. 737s Preparing to unpack .../079-libsm6_2%3a1.2.4-1_arm64.deb ... 737s Unpacking libsm6:arm64 (2:1.2.4-1) ... 737s Selecting previously unselected package libtcl8.6:arm64. 737s Preparing to unpack .../080-libtcl8.6_8.6.16+dfsg-1_arm64.deb ... 737s Unpacking libtcl8.6:arm64 (8.6.16+dfsg-1) ... 737s Selecting previously unselected package libjbig0:arm64. 737s Preparing to unpack .../081-libjbig0_2.1-6.1ubuntu2_arm64.deb ... 737s Unpacking libjbig0:arm64 (2.1-6.1ubuntu2) ... 737s Selecting previously unselected package libwebp7:arm64. 737s Preparing to unpack .../082-libwebp7_1.5.0-0.1_arm64.deb ... 737s Unpacking libwebp7:arm64 (1.5.0-0.1) ... 737s Selecting previously unselected package libtiff6:arm64. 737s Preparing to unpack .../083-libtiff6_4.5.1+git230720-4ubuntu4_arm64.deb ... 737s Unpacking libtiff6:arm64 (4.5.1+git230720-4ubuntu4) ... 737s Selecting previously unselected package libxft2:arm64. 737s Preparing to unpack .../084-libxft2_2.3.6-1build1_arm64.deb ... 737s Unpacking libxft2:arm64 (2.3.6-1build1) ... 737s Selecting previously unselected package libxss1:arm64. 737s Preparing to unpack .../085-libxss1_1%3a1.2.3-1build3_arm64.deb ... 737s Unpacking libxss1:arm64 (1:1.2.3-1build3) ... 737s Selecting previously unselected package libtk8.6:arm64. 737s Preparing to unpack .../086-libtk8.6_8.6.16-1_arm64.deb ... 737s Unpacking libtk8.6:arm64 (8.6.16-1) ... 737s Selecting previously unselected package libxt6t64:arm64. 737s Preparing to unpack .../087-libxt6t64_1%3a1.2.1-1.2build1_arm64.deb ... 737s Unpacking libxt6t64:arm64 (1:1.2.1-1.2build1) ... 737s Selecting previously unselected package zip. 737s Preparing to unpack .../088-zip_3.0-14ubuntu2_arm64.deb ... 737s Unpacking zip (3.0-14ubuntu2) ... 737s Selecting previously unselected package unzip. 737s Preparing to unpack .../089-unzip_6.0-28ubuntu6_arm64.deb ... 737s Unpacking unzip (6.0-28ubuntu6) ... 737s Selecting previously unselected package xdg-utils. 737s Preparing to unpack .../090-xdg-utils_1.2.1-2ubuntu1_all.deb ... 737s Unpacking xdg-utils (1.2.1-2ubuntu1) ... 737s Selecting previously unselected package r-base-core. 737s Preparing to unpack .../091-r-base-core_4.4.3-1_arm64.deb ... 737s Unpacking r-base-core (4.4.3-1) ... 738s Selecting previously unselected package liblzma-dev:arm64. 738s Preparing to unpack .../092-liblzma-dev_5.6.4-1_arm64.deb ... 738s Unpacking liblzma-dev:arm64 (5.6.4-1) ... 738s Selecting previously unselected package pkgconf-bin. 738s Preparing to unpack .../093-pkgconf-bin_1.8.1-4_arm64.deb ... 738s Unpacking pkgconf-bin (1.8.1-4) ... 738s Selecting previously unselected package pkgconf:arm64. 738s Preparing to unpack .../094-pkgconf_1.8.1-4_arm64.deb ... 738s Unpacking pkgconf:arm64 (1.8.1-4) ... 738s Selecting previously unselected package libtirpc-dev:arm64. 738s Preparing to unpack .../095-libtirpc-dev_1.3.4+ds-1.3_arm64.deb ... 738s Unpacking libtirpc-dev:arm64 (1.3.4+ds-1.3) ... 738s Selecting previously unselected package r-base-dev. 738s Preparing to unpack .../096-r-base-dev_4.4.3-1_all.deb ... 738s Unpacking r-base-dev (4.4.3-1) ... 738s Selecting previously unselected package pkg-r-autopkgtest. 738s Preparing to unpack .../097-pkg-r-autopkgtest_20231212ubuntu1_all.deb ... 738s Unpacking pkg-r-autopkgtest (20231212ubuntu1) ... 738s Selecting previously unselected package r-cran-lattice. 738s Preparing to unpack .../098-r-cran-lattice_0.22-6-1_arm64.deb ... 738s Unpacking r-cran-lattice (0.22-6-1) ... 738s Selecting previously unselected package r-cran-matrix. 738s Preparing to unpack .../099-r-cran-matrix_1.7-3-1_arm64.deb ... 738s Unpacking r-cran-matrix (1.7-3-1) ... 738s Selecting previously unselected package r-cran-expm. 738s Preparing to unpack .../100-r-cran-expm_1.0-0-1_arm64.deb ... 738s Unpacking r-cran-expm (1.0-0-1) ... 738s Selecting previously unselected package r-cran-rcolorbrewer. 738s Preparing to unpack .../101-r-cran-rcolorbrewer_1.1-3-1build1_all.deb ... 738s Unpacking r-cran-rcolorbrewer (1.1-3-1build1) ... 738s Selecting previously unselected package r-cran-sfsmisc. 738s Preparing to unpack .../102-r-cran-sfsmisc_1.1-20-1_all.deb ... 738s Unpacking r-cran-sfsmisc (1.1-20-1) ... 738s Setting up libgraphite2-3:arm64 (1.3.14-2ubuntu1) ... 738s Setting up libpixman-1-0:arm64 (0.44.0-3) ... 738s Setting up libsharpyuv0:arm64 (1.5.0-0.1) ... 738s Setting up libncurses-dev:arm64 (6.5+20250216-2) ... 738s Setting up liblerc4:arm64 (4.0.0+ds-5ubuntu1) ... 738s Setting up libxrender1:arm64 (1:0.9.10-1.1build1) ... 738s Setting up libdatrie1:arm64 (0.2.13-3build1) ... 738s Setting up libxcb-render0:arm64 (1.17.0-2) ... 738s Setting up unzip (6.0-28ubuntu6) ... 738s Setting up x11-common (1:7.7+23ubuntu3) ... 739s Setting up libdeflate0:arm64 (1.23-1) ... 739s Setting up libxcb-shm0:arm64 (1.17.0-2) ... 739s Setting up libreadline-dev:arm64 (8.2-6) ... 739s Setting up libgomp1:arm64 (15-20250222-0ubuntu1) ... 739s Setting up libjbig0:arm64 (2.1-6.1ubuntu2) ... 739s Setting up libpcre2-16-0:arm64 (10.45-1) ... 739s Setting up zip (3.0-14ubuntu2) ... 739s Setting up libpcre2-32-0:arm64 (10.45-1) ... 739s Setting up libblas3:arm64 (3.12.1-2) ... 739s update-alternatives: using /usr/lib/aarch64-linux-gnu/blas/libblas.so.3 to provide /usr/lib/aarch64-linux-gnu/libblas.so.3 (libblas.so.3-aarch64-linux-gnu) in auto mode 739s Setting up libtirpc-dev:arm64 (1.3.4+ds-1.3) ... 739s Setting up libpkgconf3:arm64 (1.8.1-4) ... 739s Setting up fonts-dejavu-mono (2.37-8) ... 739s Setting up libmpc3:arm64 (1.3.1-1build2) ... 739s Setting up libtcl8.6:arm64 (8.6.16+dfsg-1) ... 739s Setting up icu-devtools (76.1-1ubuntu2) ... 739s Setting up fonts-dejavu-core (2.37-8) ... 739s Setting up pkgconf-bin (1.8.1-4) ... 739s Setting up libjpeg-turbo8:arm64 (2.1.5-3ubuntu2) ... 739s Setting up libgfortran5:arm64 (15-20250222-0ubuntu1) ... 739s Setting up libwebp7:arm64 (1.5.0-0.1) ... 739s Setting up liblzma-dev:arm64 (5.6.4-1) ... 739s Setting up libubsan1:arm64 (15-20250222-0ubuntu1) ... 739s Setting up zlib1g-dev:arm64 (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 739s Setting up libpcre2-posix3:arm64 (10.45-1) ... 739s Setting up libhwasan0:arm64 (15-20250222-0ubuntu1) ... 739s Setting up libasan8:arm64 (15-20250222-0ubuntu1) ... 739s Setting up libharfbuzz0b:arm64 (10.2.0-1) ... 739s Setting up libthai-data (0.1.29-2build1) ... 739s Setting up libxss1:arm64 (1:1.2.3-1build3) ... 739s Setting up libpaper2:arm64 (2.2.5-0.3) ... 739s Setting up libtsan2:arm64 (15-20250222-0ubuntu1) ... 739s Setting up libisl23:arm64 (0.27-1) ... 739s Setting up libdeflate-dev:arm64 (1.23-1) ... 739s Setting up libicu-dev:arm64 (76.1-1ubuntu2) ... 739s Setting up xdg-utils (1.2.1-2ubuntu1) ... 739s update-alternatives: using /usr/bin/xdg-open to provide /usr/bin/open (open) in auto mode 739s Setting up libcc1-0:arm64 (15-20250222-0ubuntu1) ... 739s Setting up liblsan0:arm64 (15-20250222-0ubuntu1) ... 739s Setting up libblas-dev:arm64 (3.12.1-2) ... 739s update-alternatives: using /usr/lib/aarch64-linux-gnu/blas/libblas.so to provide /usr/lib/aarch64-linux-gnu/libblas.so (libblas.so-aarch64-linux-gnu) in auto mode 739s Setting up dctrl-tools (2.24-3build3) ... 739s Setting up libitm1:arm64 (15-20250222-0ubuntu1) ... 739s Setting up libbz2-dev:arm64 (1.0.8-6) ... 739s Setting up libjpeg8:arm64 (8c-2ubuntu11) ... 739s Setting up libice6:arm64 (2:1.1.1-1) ... 739s Setting up libjpeg-turbo8-dev:arm64 (2.1.5-3ubuntu2) ... 739s Setting up liblapack3:arm64 (3.12.1-2) ... 739s update-alternatives: using /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/aarch64-linux-gnu/liblapack.so.3 (liblapack.so.3-aarch64-linux-gnu) in auto mode 739s Setting up libpcre2-dev:arm64 (10.45-1) ... 739s Setting up fontconfig-config (2.15.0-2ubuntu1) ... 739s Setting up libpng-dev:arm64 (1.6.47-1) ... 739s Setting up libpaper-utils (2.2.5-0.3) ... 739s Setting up pkgconf:arm64 (1.8.1-4) ... 739s Setting up libthai0:arm64 (0.1.29-2build1) ... 739s Setting up liblapack-dev:arm64 (3.12.1-2) ... 739s update-alternatives: using /usr/lib/aarch64-linux-gnu/lapack/liblapack.so to provide /usr/lib/aarch64-linux-gnu/liblapack.so (liblapack.so-aarch64-linux-gnu) in auto mode 739s Setting up cpp-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 739s Setting up libtiff6:arm64 (4.5.1+git230720-4ubuntu4) ... 739s Setting up libfontconfig1:arm64 (2.15.0-2ubuntu1) ... 739s Setting up libgcc-14-dev:arm64 (14.2.0-17ubuntu3) ... 739s Setting up libjpeg8-dev:arm64 (8c-2ubuntu11) ... 739s Setting up libstdc++-14-dev:arm64 (14.2.0-17ubuntu3) ... 739s Setting up libsm6:arm64 (2:1.2.4-1) ... 739s Setting up libgfortran-14-dev:arm64 (14.2.0-17ubuntu3) ... 739s Setting up fontconfig (2.15.0-2ubuntu1) ... 741s Regenerating fonts cache... done. 741s Setting up libxft2:arm64 (2.3.6-1build1) ... 741s Setting up libtk8.6:arm64 (8.6.16-1) ... 741s Setting up libpango-1.0-0:arm64 (1.56.2-1) ... 741s Setting up libjpeg-dev:arm64 (8c-2ubuntu11) ... 741s Setting up libcairo2:arm64 (1.18.2-2) ... 741s Setting up cpp-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 741s Setting up libxt6t64:arm64 (1:1.2.1-1.2build1) ... 741s Setting up cpp-14 (14.2.0-17ubuntu3) ... 741s Setting up cpp (4:14.2.0-1ubuntu1) ... 741s Setting up gcc-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 741s Setting up libpangoft2-1.0-0:arm64 (1.56.2-1) ... 741s Setting up libpangocairo-1.0-0:arm64 (1.56.2-1) ... 741s Setting up gcc-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 741s Setting up g++-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 741s Setting up gcc-14 (14.2.0-17ubuntu3) ... 741s Setting up r-base-core (4.4.3-1) ... 741s Creating config file /etc/R/Renviron with new version 741s Setting up r-cran-lattice (0.22-6-1) ... 741s Setting up gfortran-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 741s Setting up g++-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 741s Setting up gfortran-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 741s Setting up g++-14 (14.2.0-17ubuntu3) ... 741s Setting up gfortran-14 (14.2.0-17ubuntu3) ... 741s Setting up r-cran-sfsmisc (1.1-20-1) ... 741s Setting up gcc (4:14.2.0-1ubuntu1) ... 741s Setting up r-cran-rcolorbrewer (1.1-3-1build1) ... 741s Setting up r-cran-matrix (1.7-3-1) ... 741s Setting up g++ (4:14.2.0-1ubuntu1) ... 741s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 741s Setting up build-essential (12.10ubuntu1) ... 741s Setting up r-cran-expm (1.0-0-1) ... 741s Setting up gfortran (4:14.2.0-1ubuntu1) ... 741s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f95 (f95) in auto mode 741s 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 741s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f77 (f77) in auto mode 741s 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 741s Setting up r-base-dev (4.4.3-1) ... 741s Setting up pkg-r-autopkgtest (20231212ubuntu1) ... 741s Processing triggers for libc-bin (2.41-1ubuntu2) ... 741s Processing triggers for man-db (2.13.0-1) ... 743s Processing triggers for install-info (7.1.1-1) ... 746s autopkgtest [15:37:48]: test pkg-r-autopkgtest: /usr/share/dh-r/pkg-r-autopkgtest 746s autopkgtest [15:37:48]: test pkg-r-autopkgtest: [----------------------- 746s Test: Try to load the R library expm 746s 746s R version 4.4.3 (2025-02-28) -- "Trophy Case" 746s Copyright (C) 2025 The R Foundation for Statistical Computing 746s Platform: aarch64-unknown-linux-gnu 746s 746s R is free software and comes with ABSOLUTELY NO WARRANTY. 746s You are welcome to redistribute it under certain conditions. 746s Type 'license()' or 'licence()' for distribution details. 746s 746s R is a collaborative project with many contributors. 746s Type 'contributors()' for more information and 746s 'citation()' on how to cite R or R packages in publications. 746s 746s Type 'demo()' for some demos, 'help()' for on-line help, or 746s 'help.start()' for an HTML browser interface to help. 746s Type 'q()' to quit R. 746s 746s > library('expm') 746s Loading required package: Matrix 747s 747s Attaching package: ‘expm’ 747s 747s The following object is masked from ‘package:Matrix’: 747s 747s expm 747s 747s > 747s > 747s Other tests are currently unsupported! 747s They will be progressively added. 747s autopkgtest [15:37:49]: test pkg-r-autopkgtest: -----------------------] 748s pkg-r-autopkgtest PASS 748s autopkgtest [15:37:50]: test pkg-r-autopkgtest: - - - - - - - - - - results - - - - - - - - - - 748s autopkgtest [15:37:50]: @@@@@@@@@@@@@@@@@@@@ summary 748s run-unit-test PASS 748s pkg-r-autopkgtest PASS 766s nova [W] Using flock in prodstack6-arm64 766s Creating nova instance adt-plucky-arm64-r-cran-expm-20250315-152522-juju-7f2275-prod-proposed-migration-environment-2-3e28b34b-3992-4277-b640-eb8fbe2ee721 from image adt/ubuntu-plucky-arm64-server-20250315.img (UUID bd6e766c-b51f-4b53-86d6-23aa4d18f524)... 766s nova [W] Timed out waiting for 277ccada-3191-46c6-92c9-e0a425f055fc to get deleted. 766s nova [W] Using flock in prodstack6-arm64 766s Creating nova instance adt-plucky-arm64-r-cran-expm-20250315-152522-juju-7f2275-prod-proposed-migration-environment-2-3e28b34b-3992-4277-b640-eb8fbe2ee721 from image adt/ubuntu-plucky-arm64-server-20250315.img (UUID bd6e766c-b51f-4b53-86d6-23aa4d18f524)... 766s nova [W] Timed out waiting for 5ddb8d8e-3a86-47d1-a969-693c3da22cc7 to get deleted.