------------------------------------------------------------------------
-- dqRotate.decTest -- rotate decQuad coefficient left or right       --
-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases"     --
-- at http://www2.hursley.ibm.com/decimal for the description of      --
-- these testcases.                                                   --
--                                                                    --
-- These testcases are experimental ('beta' versions), and they       --
-- may contain errors.  They are offered on an as-is basis.  In       --
-- particular, achieving the same results as the tests here is not    --
-- a guarantee that an implementation complies with any Standard      --
-- or specification.  The tests are not exhaustive.                   --
--                                                                    --
-- Please send comments, suggestions, and corrections to the author:  --
--   Mike Cowlishaw, IBM Fellow                                       --
--   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
--   mfc@uk.ibm.com                                                   --
------------------------------------------------------------------------
version: 2.59

extended:    1
clamp:       1
precision:   34
maxExponent: 6144
minExponent: -6143
rounding:    half_even

-- Sanity check
dqrot001 rotate                                   0    0  ->  0
dqrot002 rotate                                   0    2  ->  0
dqrot003 rotate                                   1    2  ->  100
dqrot004 rotate                                   1   33  ->  1000000000000000000000000000000000
dqrot005 rotate                                   1   34  ->  1
dqrot006 rotate                                   1   -1  ->  1000000000000000000000000000000000
dqrot007 rotate                                   0   -2  ->  0
dqrot008 rotate  1234567890123456789012345678901234   -1  ->  4123456789012345678901234567890123
dqrot009 rotate  1234567890123456789012345678901234   -33 ->  2345678901234567890123456789012341
dqrot010 rotate  1234567890123456789012345678901234   -34 ->  1234567890123456789012345678901234
dqrot011 rotate  9934567890123456789012345678901234   -33 ->  9345678901234567890123456789012349
dqrot012 rotate  9934567890123456789012345678901234   -34 ->  9934567890123456789012345678901234

-- rhs must be an integer
dqrot015 rotate        1    1.5    -> NaN Invalid_operation
dqrot016 rotate        1    1.0    -> NaN Invalid_operation
dqrot017 rotate        1    0.1    -> NaN Invalid_operation
dqrot018 rotate        1    0.0    -> NaN Invalid_operation
dqrot019 rotate        1    1E+1   -> NaN Invalid_operation
dqrot020 rotate        1    1E+99  -> NaN Invalid_operation
dqrot021 rotate        1    Inf    -> NaN Invalid_operation
dqrot022 rotate        1    -Inf   -> NaN Invalid_operation
-- and |rhs| <= precision
dqrot025 rotate        1    -1000  -> NaN Invalid_operation
dqrot026 rotate        1    -35    -> NaN Invalid_operation
dqrot027 rotate        1     35    -> NaN Invalid_operation
dqrot028 rotate        1     1000  -> NaN Invalid_operation

-- full pattern
dqrot030 rotate  1234567890123456789012345678901234         -34  -> 1234567890123456789012345678901234
dqrot031 rotate  1234567890123456789012345678901234         -33  -> 2345678901234567890123456789012341
dqrot032 rotate  1234567890123456789012345678901234         -32  -> 3456789012345678901234567890123412
dqrot033 rotate  1234567890123456789012345678901234         -31  -> 4567890123456789012345678901234123
dqrot034 rotate  1234567890123456789012345678901234         -30  -> 5678901234567890123456789012341234
dqrot035 rotate  1234567890123456789012345678901234         -29  -> 6789012345678901234567890123412345
dqrot036 rotate  1234567890123456789012345678901234         -28  -> 7890123456789012345678901234123456
dqrot037 rotate  1234567890123456789012345678901234        =(>>>9?