1757 real(DP):: sec_ary_mod(imin+imin:imax)
1758 integer:: i, move_down_index
1759 real(DP):: move_down
1760 real(DP):: factor_dp
1769 if ( .not. all( factor % sec_ary (imax-4:imax) == (/ 0, 0, 0, 0, 0 /) ) )
then 1771 &
'factor must be smaller than 10^12' )
1774 if ( sclsec == factor )
then 1779 factor_scl % sec_ary(imin:-1) = 0
1780 factor_scl % sec_ary(imin-imin:imax) = factor % sec_ary(imin:imax+imin)
1781 factor_scl % flag_negative = factor % flag_negative
1783 factor_dp = factor_scl
1786 do i = imax, imin + imin, -1
1788 if ( move_down /= 0.0_dp )
then 1789 if (
abs(factor_dp) > ( move_down + scale_factor ) * scale_factor_xx( i - imin ) )
exit 1792 if ( i > imin - 1 )
then 1794 &
mod( ( sclsec % sec_ary(i) + move_down ), factor_dp )
1796 sec_ary_mod(i) =
mod( move_down, factor_dp )
1799 if ( sec_ary_mod(i) /= 0.0_dp )
then 1800 move_down = sec_ary_mod(i) * scale_factor
1807 result = move_down * scale_factor_xx(move_down_index)
1808 if ( move_down_index > imin - 1 )
then 1809 result % sec_ary(imin:move_down_index) = sclsec % sec_ary(imin:move_down_index)
1812 result % flag_negative = .false.
1814 if ( .not. result == zero_sec )
then 1815 if ( .not. sclsec % flag_negative .and. factor % flag_negative )
then 1816 result = - factor - result
1817 result % flag_negative = .not. sclsec % flag_negative
1819 elseif ( sclsec % flag_negative .and. .not. factor % flag_negative )
then 1820 result = factor - result
1821 result % flag_negative = .not. sclsec % flag_negative
1824 result % flag_negative = sclsec % flag_negative