+++ /dev/null
-------------------------------------------------------------------------\r
--- dqRotate.decTest -- rotate decQuad coefficient left or right --\r
--- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --\r
-------------------------------------------------------------------------\r
--- Please see the document "General Decimal Arithmetic Testcases" --\r
--- at http://www2.hursley.ibm.com/decimal for the description of --\r
--- these testcases. --\r
--- --\r
--- These testcases are experimental ('beta' versions), and they --\r
--- may contain errors. They are offered on an as-is basis. In --\r
--- particular, achieving the same results as the tests here is not --\r
--- a guarantee that an implementation complies with any Standard --\r
--- or specification. The tests are not exhaustive. --\r
--- --\r
--- Please send comments, suggestions, and corrections to the author: --\r
--- Mike Cowlishaw, IBM Fellow --\r
--- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --\r
--- mfc@uk.ibm.com --\r
-------------------------------------------------------------------------\r
-version: 2.59\r
-\r
-extended: 1\r
-clamp: 1\r
-precision: 34\r
-maxExponent: 6144\r
-minExponent: -6143\r
-rounding: half_even\r
-\r
--- Sanity check\r
-dqrot001 rotate 0 0 -> 0\r
-dqrot002 rotate 0 2 -> 0\r
-dqrot003 rotate 1 2 -> 100\r
-dqrot004 rotate 1 33 -> 1000000000000000000000000000000000\r
-dqrot005 rotate 1 34 -> 1\r
-dqrot006 rotate 1 -1 -> 1000000000000000000000000000000000\r
-dqrot007 rotate 0 -2 -> 0\r
-dqrot008 rotate 1234567890123456789012345678901234 -1 -> 4123456789012345678901234567890123\r
-dqrot009 rotate 1234567890123456789012345678901234 -33 -> 2345678901234567890123456789012341\r
-dqrot010 rotate 1234567890123456789012345678901234 -34 -> 1234567890123456789012345678901234\r
-dqrot011 rotate 9934567890123456789012345678901234 -33 -> 9345678901234567890123456789012349\r
-dqrot012 rotate 9934567890123456789012345678901234 -34 -> 9934567890123456789012345678901234\r
-\r
--- rhs must be an integer\r
-dqrot015 rotate 1 1.5 -> NaN Invalid_operation\r
-dqrot016 rotate 1 1.0 -> NaN Invalid_operation\r
-dqrot017 rotate 1 0.1 -> NaN Invalid_operation\r
-dqrot018 rotate 1 0.0 -> NaN Invalid_operation\r
-dqrot019 rotate 1 1E+1 -> NaN Invalid_operation\r
-dqrot020 rotate 1 1E+99 -> NaN Invalid_operation\r
-dqrot021 rotate 1 Inf -> NaN Invalid_operation\r
-dqrot022 rotate 1 -Inf -> NaN Invalid_operation\r
--- and |rhs| <= precision\r
-dqrot025 rotate 1 -1000 -> NaN Invalid_operation\r
-dqrot026 rotate 1 -35 -> NaN Invalid_operation\r
-dqrot027 rotate 1 35 -> NaN Invalid_operation\r
-dqrot028 rotate 1 1000 -> NaN Invalid_operation\r
-\r
--- full pattern\r
-dqrot030 rotate 1234567890123456789012345678901234 -34 -> 1234567890123456789012345678901234\r
-dqrot031 rotate 1234567890123456789012345678901234 -33 -> 2345678901234567890123456789012341\r
-dqrot032 rotate 1234567890123456789012345678901234 -32 -> 3456789012345678901234567890123412\r
-dqrot033 rotate 1234567890123456789012345678901234 -31 -> 4567890123456789012345678901234123\r
-dqrot034 rotate 1234567890123456789012345678901234 -30 -> 5678901234567890123456789012341234\r
-dqrot035 rotate 1234567890123456789012345678901234 -29 -> 6789012345678901234567890123412345\r
-dqrot036 rotate 1234567890123456789012345678901234 -28 -> 7890123456789012345678901234123456\r
-dqrot037 rotate 1234567890123456789012345678901234 -27 -> 8901234567890123456789012341234567\r
-dqrot038 rotate 1234567890123456789012345678901234 -26 -> 9012345678901234567890123412345678\r
-dqrot039 rotate 1234567890123456789012345678901234 -25 -> 123456789012345678901234123456789\r
-dqrot040 rotate 1234567890123456789012345678901234 -24 -> 1234567890123456789012341234567890\r
-dqrot041 rotate 1234567890123456789012345678901234 -23 -> 2345678901234567890123412345678901\r
-dqrot042 rotate 1234567890123456789012345678901234 -22 -> 3456789012345678901234123456789012\r
-dqrot043 rotate 1234567890123456789012345678901234 -21 -> 4567890123456789012341234567890123\r
-dqrot044 rotate 1234567890123456789012345678901234 -20 -> 5678901234567890123412345678901234\r
-dqrot045 rotate 1234567890123456789012345678901234 -19 -> 6789012345678901234123456789012345\r
-dqrot047 rotate 1234567890123456789012345678901234 -18 -> 7890123456789012341234567890123456\r
-dqrot048 rotate 1234567890123456789012345678901234 -17 -> 8901234567890123412345678901234567\r
-dqrot049 rotate 1234567890123456789012345678901234 -16 -> 9012345678901234123456789012345678\r
-dqrot050 rotate 1234567890123456789012345678901234 -15 -> 123456789012341234567890123456789\r
-dqrot051 rotate 1234567890123456789012345678901234 -14 -> 1234567890123412345678901234567890\r
-dqrot052 rotate 1234567890123456789012345678901234 -13 -> 2345678901234123456789012345678901\r
-dqrot053 rotate 1234567890123456789012345678901234 -12 -> 3456789012341234567890123456789012\r
-dqrot054 rotate 1234567890123456789012345678901234 -11 -> 4567890123412345678901234567890123\r
-dqrot055 rotate 1234567890123456789012345678901234 -10 -> 5678901234123456789012345678901234\r
-dqrot056 rotate 1234567890123456789012345678901234 -9 -> 6789012341234567890123456789012345\r
-dqrot057 rotate 1234567890123456789012345678901234 -8 -> 7890123412345678901234567890123456\r
-dqrot058 rotate 1234567890123456789012345678901234 -7 -> 8901234123456789012345678901234567\r
-dqrot059 rotate 1234567890123456789012345678901234 -6 -> 9012341234567890123456789012345678\r
-dqrot060 rotate 1234567890123456789012345678901234 -5 -> 123412345678901234567890123456789\r
-dqrot061 rotate 1234567890123456789012345678901234 -4 -> 1234123456789012345678901234567890\r
-dqrot062 rotate 1234567890123456789012345678901234 -3 -> 2341234567890123456789012345678901\r
-dqrot063 rotate 1234567890123456789012345678901234 -2 -> 3412345678901234567890123456789012\r
-dqrot064 rotate 1234567890123456789012345678901234 -1 -> 4123456789012345678901234567890123\r
-dqrot065 rotate 1234567890123456789012345678901234 -0 -> 1234567890123456789012345678901234\r
-\r
-dqrot066 rotate 1234567890123456789012345678901234 +0 -> 1234567890123456789012345678901234\r
-dqrot067 rotate 1234567890123456789012345678901234 +1 -> 2345678901234567890123456789012341\r
-dqrot068 rotate 1234567890123456789012345678901234 +2 -> 3456789012345678901234567890123412\r
-dqrot069 rotate 1234567890123456789012345678901234 +3 -> 4567890123456789012345678901234123\r
-dqrot070 rotate 1234567890123456789012345678901234 +4 -> 5678901234567890123456789012341234\r
-dqrot071 rotate 1234567890123456789012345678901234 +5 -> 6789012345678901234567890123412345\r
-dqrot072 rotate 1234567890123456789012345678901234 +6 -> 7890123456789012345678901234123456\r
-dqrot073 rotate 1234567890123456789012345678901234 +7 -> 8901234567890123456789012341234567\r
-dqrot074 rotate 1234567890123456789012345678901234 +8 -> 9012345678901234567890123412345678\r
-dqrot075 rotate 1234567890123456789012345678901234 +9 -> 123456789012345678901234123456789\r
-dqrot076 rotate 1234567890123456789012345678901234 +10 -> 1234567890123456789012341234567890\r
-dqrot077 rotate 1234567890123456789012345678901234 +11 -> 2345678901234567890123412345678901\r
-dqrot078 rotate 1234567890123456789012345678901234 +12 -> 3456789012345678901234123456789012\r
-dqrot079 rotate 1234567890123456789012345678901234 +13 -> 4567890123456789012341234567890123\r
-dqrot080 rotate 1234567890123456789012345678901234 +14 -> 5678901234567890123412345678901234\r
-dqrot081 rotate 1234567890123456789012345678901234 +15 -> 6789012345678901234123456789012345\r
-dqrot082 rotate 1234567890123456789012345678901234 +16 -> 7890123456789012341234567890123456\r
-dqrot083 rotate 1234567890123456789012345678901234 +17 -> 8901234567890123412345678901234567\r
-dqrot084 rotate 1234567890123456789012345678901234 +18 -> 9012345678901234123456789012345678\r
-dqrot085 rotate 1234567890123456789012345678901234 +19 -> 123456789012341234567890123456789\r
-dqrot086 rotate 1234567890123456789012345678901234 +20 -> 1234567890123412345678901234567890\r
-dqrot087 rotate 1234567890123456789012345678901234 +21 -> 2345678901234123456789012345678901\r
-dqrot088 rotate 1234567890123456789012345678901234 +22 -> 3456789012341234567890123456789012\r
-dqrot089 rotate 1234567890123456789012345678901234 +23 -> 4567890123412345678901234567890123\r
-dqrot090 rotate 1234567890123456789012345678901234 +24 -> 5678901234123456789012345678901234\r
-dqrot091 rotate 1234567890123456789012345678901234 +25 -> 6789012341234567890123456789012345\r
-dqrot092 rotate 1234567890123456789012345678901234 +26 -> 7890123412345678901234567890123456\r
-dqrot093 rotate 1234567890123456789012345678901234 +27 -> 8901234123456789012345678901234567\r
-dqrot094 rotate 1234567890123456789012345678901234 +28 -> 9012341234567890123456789012345678\r
-dqrot095 rotate 1234567890123456789012345678901234 +29 -> 123412345678901234567890123456789\r
-dqrot096 rotate 1234567890123456789012345678901234 +30 -> 1234123456789012345678901234567890\r
-dqrot097 rotate 1234567890123456789012345678901234 +31 -> 2341234567890123456789012345678901\r
-dqrot098 rotate 1234567890123456789012345678901234 +32 -> 3412345678901234567890123456789012\r
-dqrot099 rotate 1234567890123456789012345678901234 +33 -> 4123456789012345678901234567890123\r
-dqrot100 rotate 1234567890123456789012345678901234 +34 -> 1234567890123456789012345678901234\r
-\r
--- zeros\r
-dqrot270 rotate 0E-10 +29 -> 0E-10\r
-dqrot271 rotate 0E-10 -29 -> 0E-10\r
-dqrot272 rotate 0.000 +29 -> 0.000\r
-dqrot273 rotate 0.000 -29 -> 0.000\r
-dqrot274 rotate 0E+10 +29 -> 0E+10\r
-dqrot275 rotate 0E+10 -29 -> 0E+10\r
-dqrot276 rotate -0E-10 +29 -> -0E-10\r
-dqrot277 rotate -0E-10 -29 -> -0E-10\r
-dqrot278 rotate -0.000 +29 -> -0.000\r
-dqrot279 rotate -0.000 -29 -> -0.000\r
-dqrot280 rotate -0E+10 +29 -> -0E+10\r
-dqrot281 rotate -0E+10 -29 -> -0E+10\r
-\r
--- Nmax, Nmin, Ntiny\r
-dqrot141 rotate 9.999999999999999999999999999999999E+6144 -1 -> 9.999999999999999999999999999999999E+6144\r
-dqrot142 rotate 9.999999999999999999999999999999999E+6144 -33 -> 9.999999999999999999999999999999999E+6144\r
-dqrot143 rotate 9.999999999999999999999999999999999E+6144 1 -> 9.999999999999999999999999999999999E+6144\r
-dqrot144 rotate 9.999999999999999999999999999999999E+6144 33 -> 9.999999999999999999999999999999999E+6144\r
-dqrot145 rotate 1E-6143 -1 -> 1.000000000000000000000000000000000E-6110\r
-dqrot146 rotate 1E-6143 -33 -> 1.0E-6142\r
-dqrot147 rotate 1E-6143 1 -> 1.0E-6142\r
-dqrot148 rotate 1E-6143 33 -> 1.000000000000000000000000000000000E-6110\r
-dqrot151 rotate 1.000000000000000000000000000000000E-6143 -1 -> 1.00000000000000000000000000000000E-6144\r
-dqrot152 rotate 1.000000000000000000000000000000000E-6143 -33 -> 1E-6176\r
-dqrot153 rotate 1.000000000000000000000000000000000E-6143 1 -> 1E-6176\r
-dqrot154 rotate 1.000000000000000000000000000000000E-6143 33 -> 1.00000000000000000000000000000000E-6144\r
-dqrot155 rotate 9.000000000000000000000000000000000E-6143 -1 -> 9.00000000000000000000000000000000E-6144\r
-dqrot156 rotate 9.000000000000000000000000000000000E-6143 -33 -> 9E-6176\r
-dqrot157 rotate 9.000000000000000000000000000000000E-6143 1 -> 9E-6176\r
-dqrot158 rotate 9.000000000000000000000000000000000E-6143 33 -> 9.00000000000000000000000000000000E-6144\r
-dqrot160 rotate 1E-6176 -1 -> 1.000000000000000000000000000000000E-6143\r
-dqrot161 rotate 1E-6176 -33 -> 1.0E-6175\r
-dqrot162 rotate 1E-6176 1 -> 1.0E-6175\r
-dqrot163 rotate 1E-6176 33 -> 1.000000000000000000000000000000000E-6143\r
--- negatives\r
-dqrot171 rotate -9.999999999999999999999999999999999E+6144 -1 -> -9.999999999999999999999999999999999E+6144\r
-dqrot172 rotate -9.999999999999999999999999999999999E+6144 -33 -> -9.999999999999999999999999999999999E+6144\r
-dqrot173 rotate -9.999999999999999999999999999999999E+6144 1 -> -9.999999999999999999999999999999999E+6144\r
-dqrot174 rotate -9.999999999999999999999999999999999E+6144 33 -> -9.999999999999999999999999999999999E+6144\r
-dqrot175 rotate -1E-6143 -1 -> -1.000000000000000000000000000000000E-6110\r
-dqrot176 rotate -1E-6143 -33 -> -1.0E-6142\r
-dqrot177 rotate -1E-6143 1 -> -1.0E-6142\r
-dqrot178 rotate -1E-6143 33 -> -1.000000000000000000000000000000000E-6110\r
-dqrot181 rotate -1.000000000000000000000000000000000E-6143 -1 -> -1.00000000000000000000000000000000E-6144\r
-dqrot182 rotate -1.000000000000000000000000000000000E-6143 -33 -> -1E-6176\r
-dqrot183 rotate -1.000000000000000000000000000000000E-6143 1 -> -1E-6176\r
-dqrot184 rotate -1.000000000000000000000000000000000E-6143 33 -> -1.00000000000000000000000000000000E-6144\r
-dqrot185 rotate -9.000000000000000000000000000000000E-6143 -1 -> -9.00000000000000000000000000000000E-6144\r
-dqrot186 rotate -9.000000000000000000000000000000000E-6143 -33 -> -9E-6176\r
-dqrot187 rotate -9.000000000000000000000000000000000E-6143 1 -> -9E-6176\r
-dqrot188 rotate -9.000000000000000000000000000000000E-6143 33 -> -9.00000000000000000000000000000000E-6144\r
-dqrot190 rotate -1E-6176 -1 -> -1.000000000000000000000000000000000E-6143\r
-dqrot191 rotate -1E-6176 -33 -> -1.0E-6175\r
-dqrot192 rotate -1E-6176 1 -> -1.0E-6175\r
-dqrot193 rotate -1E-6176 33 -> -1.000000000000000000000000000000000E-6143\r
-\r
--- more negatives (of sanities)\r
-dqrot201 rotate -0 0 -> -0\r
-dqrot202 rotate -0 2 -> -0\r
-dqrot203 rotate -1 2 -> -100\r
-dqrot204 rotate -1 33 -> -1000000000000000000000000000000000\r
-dqrot205 rotate -1 34 -> -1\r
-dqrot206 rotate -1 -1 -> -1000000000000000000000000000000000\r
-dqrot207 rotate -0 -2 -> -0\r
-dqrot208 rotate -1234567890123456789012345678901234 -1 -> -4123456789012345678901234567890123\r
-dqrot209 rotate -1234567890123456789012345678901234 -33 -> -2345678901234567890123456789012341\r
-dqrot210 rotate -1234567890123456789012345678901234 -34 -> -1234567890123456789012345678901234\r
-dqrot211 rotate -9934567890123456789012345678901234 -33 -> -9345678901234567890123456789012349\r
-dqrot212 rotate -9934567890123456789012345678901234 -34 -> -9934567890123456789012345678901234\r
-\r
-\r
--- Specials; NaNs are handled as usual\r
-dqrot781 rotate -Inf -8 -> -Infinity\r
-dqrot782 rotate -Inf -1 -> -Infinity\r
-dqrot783 rotate -Inf -0 -> -Infinity\r
-dqrot784 rotate -Inf 0 -> -Infinity\r
-dqrot785 rotate -Inf 1 -> -Infinity\r
-dqrot786 rotate -Inf 8 -> -Infinity\r
-dqrot787 rotate -1000 -Inf -> NaN Invalid_operation\r
-dqrot788 rotate -Inf -Inf -> NaN Invalid_operation\r
-dqrot789 rotate -1 -Inf -> NaN Invalid_operation\r
-dqrot790 rotate -0 -Inf -> NaN Invalid_operation\r
-dqrot791 rotate 0 -Inf -> NaN Invalid_operation\r
-dqrot792 rotate 1 -Inf -> NaN Invalid_operation\r
-dqrot793 rotate 1000 -Inf -> NaN Invalid_operation\r
-dqrot794 rotate Inf -Inf -> NaN Invalid_operation\r
-\r
-dqrot800 rotate Inf -Inf -> NaN Invalid_operation\r
-dqrot801 rotate Inf -8 -> Infinity\r
-dqrot802 rotate Inf -1 -> Infinity\r
-dqrot803 rotate Inf -0 -> Infinity\r
-dqrot804 rotate Inf 0 -> Infinity\r
-dqrot805 rotate Inf 1 -> Infinity\r
-dqrot806 rotate Inf 8 -> Infinity\r
-dqrot807 rotate Inf Inf -> NaN Invalid_operation\r
-dqrot808 rotate -1000 Inf -> NaN Invalid_operation\r
-dqrot809 rotate -Inf Inf -> NaN Invalid_operation\r
-dqrot810 rotate -1 Inf -> NaN Invalid_operation\r
-dqrot811 rotate -0 Inf -> NaN Invalid_operation\r
-dqrot812 rotate 0 Inf -> NaN Invalid_operation\r
-dqrot813 rotate 1 Inf -> NaN Invalid_operation\r
-dqrot814 rotate 1000 Inf -> NaN Invalid_operation\r
-dqrot815 rotate Inf Inf -> NaN Invalid_operation\r
-\r
-dqrot821 rotate NaN -Inf -> NaN\r
-dqrot822 rotate NaN -1000 -> NaN\r
-dqrot823 rotate NaN -1 -> NaN\r
-dqrot824 rotate NaN -0 -> NaN\r
-dqrot825 rotate NaN 0 -> NaN\r
-dqrot826 rotate NaN 1 -> NaN\r
-dqrot827 rotate NaN 1000 -> NaN\r
-dqrot828 rotate NaN Inf -> NaN\r
-dqrot829 rotate NaN NaN -> NaN\r
-dqrot830 rotate -Inf NaN -> NaN\r
-dqrot831 rotate -1000 NaN -> NaN\r
-dqrot832 rotate -1 NaN -> NaN\r
-dqrot833 rotate -0 NaN -> NaN\r
-dqrot834 rotate 0 NaN -> NaN\r
-dqrot835 rotate 1 NaN -> NaN\r
-dqrot836 rotate 1000 NaN -> NaN\r
-dqrot837 rotate Inf NaN -> NaN\r
-\r
-dqrot841 rotate sNaN -Inf -> NaN Invalid_operation\r
-dqrot842 rotate sNaN -1000 -> NaN Invalid_operation\r
-dqrot843 rotate sNaN -1 -> NaN Invalid_operation\r
-dqrot844 rotate sNaN -0 -> NaN Invalid_operation\r
-dqrot845 rotate sNaN 0 -> NaN Invalid_operation\r
-dqrot846 rotate sNaN 1 -> NaN Invalid_operation\r
-dqrot847 rotate sNaN 1000 -> NaN Invalid_operation\r
-dqrot848 rotate sNaN NaN -> NaN Invalid_operation\r
-dqrot849 rotate sNaN sNaN -> NaN Invalid_operation\r
-dqrot850 rotate NaN sNaN -> NaN Invalid_operation\r
-dqrot851 rotate -Inf sNaN -> NaN Invalid_operation\r
-dqrot852 rotate -1000 sNaN -> NaN Invalid_operation\r
-dqrot853 rotate -1 sNaN -> NaN Invalid_operation\r
-dqrot854 rotate -0 sNaN -> NaN Invalid_operation\r
-dqrot855 rotate 0 sNaN -> NaN Invalid_operation\r
-dqrot856 rotate 1 sNaN -> NaN Invalid_operation\r
-dqrot857 rotate 1000 sNaN -> NaN Invalid_operation\r
-dqrot858 rotate Inf sNaN -> NaN Invalid_operation\r
-dqrot859 rotate NaN sNaN -> NaN Invalid_operation\r
-\r
--- propagating NaNs\r
-dqrot861 rotate NaN1 -Inf -> NaN1\r
-dqrot862 rotate +NaN2 -1000 -> NaN2\r
-dqrot863 rotate NaN3 1000 -> NaN3\r
-dqrot864 rotate NaN4 Inf -> NaN4\r
-dqrot865 rotate NaN5 +NaN6 -> NaN5\r
-dqrot866 rotate -Inf NaN7 -> NaN7\r
-dqrot867 rotate -1000 NaN8 -> NaN8\r
-dqrot868 rotate 1000 NaN9 -> NaN9\r
-dqrot869 rotate Inf +NaN10 -> NaN10\r
-dqrot871 rotate sNaN11 -Inf -> NaN11 Invalid_operation\r
-dqrot872 rotate sNaN12 -1000 -> NaN12 Invalid_operation\r
-dqrot873 rotate sNaN13 1000 -> NaN13 Invalid_operation\r
-dqrot874 rotate sNaN14 NaN17 -> NaN14 Invalid_operation\r
-dqrot875 rotate sNaN15 sNaN18 -> NaN15 Invalid_operation\r
-dqrot876 rotate NaN16 sNaN19 -> NaN19 Invalid_operation\r
-dqrot877 rotate -Inf +sNaN20 -> NaN20 Invalid_operation\r
-dqrot878 rotate -1000 sNaN21 -> NaN21 Invalid_operation\r
-dqrot879 rotate 1000 sNaN22 -> NaN22 Invalid_operation\r
-dqrot880 rotate Inf sNaN23 -> NaN23 Invalid_operation\r
-dqrot881 rotate +NaN25 +sNaN24 -> NaN24 Invalid_operation\r
-dqrot882 rotate -NaN26 NaN28 -> -NaN26\r
-dqrot883 rotate -sNaN27 sNaN29 -> -NaN27 Invalid_operation\r
-dqrot884 rotate 1000 -NaN30 -> -NaN30\r
-dqrot885 rotate 1000 -sNaN31 -> -NaN31 Invalid_operation\r