Data Types | Functions/Subroutines
dc_scaledsec Module Reference

Functions/Subroutines

subroutine dcscaledsectonumi (sec, sclsec)
 
subroutine dcscaledsectonumr (sec, sclsec)
 
subroutine dcscaledsectonumd (sec, sclsec)
 
subroutine, public dcscaledsecputline (sclsec, unit, indent)
 
logical function dcscaledsec_eq_ss (sclsec1, sclsec2)
 
type(dc_scaled_sec) function dcscaledsec_add_si (sclsec, factor)
 
type(dc_scaled_sec) function dcscaledsec_mul_si (sclsec, factor)
 
type(dc_scaled_sec) function dcscaledsec_mul_is (factor, sclsec)
 
type(dc_scaled_sec) function dcscaledsec_mul_ds (factor, sclsec)
 
type(dc_scaled_sec) function dcscaledsec_mul_sr (sclsec, factor)
 
type(dc_scaled_sec) function dcscaledsec_mul_rs (factor, sclsec)
 
type(dc_scaled_sec) function dcscaledsec_div_ss (sclsec, factor)
 
type(dc_scaled_sec) function dcscaledsec_div_si (sclsec, factor)
 
type(dc_scaled_sec) function dcscaledsec_div_sd (sclsec, factor)
 
type(dc_scaled_sec) function dcscaledsec_div_sr (sclsec, factor)
 
type(dc_scaled_sec) function dcscaledsec_mod_ss (sclsec, factor)
 
type(dc_scaled_sec) function dcscaledsec_mod_si (sclsec, factor)
 
type(dc_scaled_sec) function dcscaledsec_mod_sr (sclsec, factor)
 
type(dc_scaled_sec) function dcscaledsec_mod_sd (sclsec, factor)
 
type(dc_scaled_sec) function dcscaledsec_modulo_ss (sclsec, factor)
 
type(dc_scaled_sec) function dcscaledsec_modulo_si (sclsec, factor)
 
type(dc_scaled_sec) function dcscaledsec_modulo_sr (sclsec, factor)
 
type(dc_scaled_sec) function dcscaledsec_modulo_sd (sclsec, factor)
 
type(dc_scaled_sec) function dcscaledsec_abs_s (sclsec)
 

Function/Subroutine Documentation

◆ dcscaledsec_abs_s()

type(dc_scaled_sec) function dc_scaledsec::dcscaledsec_abs_s ( type(dc_scaled_sec), intent(in)  sclsec)

Definition at line 1891 of file dc_scaledsec.f90.

1891  !
1892  ! DC_SCALED_SEC 型変数の絶対値を返す.
1893  !
1894  ! Return an absolute value of a "DC_SCALED_SEC" variable
1895  !
1896  implicit none
1897  type(dc_scaled_sec), intent(in):: sclsec
1898 
1899  continue
1900  result = sclsec
1901  if ( result % flag_negative ) result % flag_negative = .false.

◆ dcscaledsec_add_si()

type(dc_scaled_sec) function dc_scaledsec::dcscaledsec_add_si ( type(dc_scaled_sec), intent(in)  sclsec,
integer, intent(in)  factor 
)

Definition at line 999 of file dc_scaledsec.f90.

999  !
1000  ! 2 つの DC_SCALED_SEC 型変数の加算.
1001  !
1002  ! Addition of two "DC_SCALED_SEC" variables
1003  !
1004  implicit none
1005  type(dc_scaled_sec), intent(in):: sclsec
1006  integer, intent(in):: factor
1007  type(dc_scaled_sec):: factor_scl
1008  continue
1009  factor_scl = factor
1010  result = sclsec + factor_scl

◆ dcscaledsec_div_sd()

type(dc_scaled_sec) function dc_scaledsec::dcscaledsec_div_sd ( type(dc_scaled_sec), intent(in)  sclsec,
real(dp), intent(in)  factor 
)

Definition at line 1550 of file dc_scaledsec.f90.

1550  !
1551  ! DC_SCALED_SEC 型変数の除算.
1552  !
1553  ! Division of a "DC_SCALED_SEC" variable
1554  !
1555  use dc_message, only: messagenotify
1556  implicit none
1557  type(dc_scaled_sec), intent(in):: sclsec
1558  real(DP), intent(in):: factor
1559  integer:: i
1560  real(DP):: factor_abs, move_down, sec_ary_mod(imin+imin:imax)
1561  !logical:: flag_approximate
1562  continue
1563  if ( sclsec % flag_negative ) then
1564  result % flag_negative = .not. factor < 0.0_dp
1565  else
1566  result % flag_negative = factor < 0.0_dp
1567  end if
1568  factor_abs = abs(factor) * scale_factor_xx(2)
1569 
1570 ! flag_approximate = .false.
1571  move_down = 0.0_dp
1572  do i = imax, imin + imin, -1
1573  if ( i > imax + imin ) then
1574  sec_ary_mod(i) = sclsec % sec_ary(i)
1575  elseif ( i > imin - 1 ) then
1576  result % sec_ary(i-imin) = int( ( sclsec % sec_ary(i) + move_down ) / factor_abs )
1577  sec_ary_mod(i) = &
1578  & mod( ( sclsec % sec_ary(i) + move_down ), factor_abs )
1579  else
1580  result % sec_ary(i-imin) = int( move_down / factor_abs )
1581  sec_ary_mod(i) = mod( move_down, factor_abs )
1582  end if
1583 
1584  if ( sec_ary_mod(i) /= 0.0_dp ) then
1585  !if ( i < imin ) flag_approximate = .true.
1586  move_down = sec_ary_mod(i) * scale_factor
1587  else
1588  move_down = 0.0_dp
1589  end if
1590  end do
1591 
1592 !!$ if ( flag_approximate ) then
1593 !!$ call MessageNotify( 'W', 'dc_scaledsec#operator(/)', &
1594 !!$ & 'result may be calculated approximately' )
1595 !!$ end if
1596 

◆ dcscaledsec_div_si()

type(dc_scaled_sec) function dc_scaledsec::dcscaledsec_div_si ( type(dc_scaled_sec), intent(in)  sclsec,
integer, intent(in)  factor 
)

Definition at line 1534 of file dc_scaledsec.f90.

1534  !
1535  ! DC_SCALED_SEC 型変数の除算.
1536  !
1537  ! Division of a "DC_SCALED_SEC" variable
1538  !
1539  use dc_message, only: messagenotify
1540  implicit none
1541  type(dc_scaled_sec), intent(in):: sclsec
1542  integer, intent(in):: factor
1543  continue
1544  result = sclsec / real( factor, dp )

◆ dcscaledsec_div_sr()

type(dc_scaled_sec) function dc_scaledsec::dcscaledsec_div_sr ( type(dc_scaled_sec), intent(in)  sclsec,
real, intent(in)  factor 
)

Definition at line 1602 of file dc_scaledsec.f90.

1602  !
1603  ! DC_SCALED_SEC 型変数の除算.
1604  !
1605  ! Division of a "DC_SCALED_SEC" variable
1606  !
1607  use dc_message, only: messagenotify
1608  implicit none
1609  type(dc_scaled_sec), intent(in):: sclsec
1610  real, intent(in):: factor
1611  continue
1612  result = sclsec / real( factor, dp )

◆ dcscaledsec_div_ss()

type(dc_scaled_sec) function dc_scaledsec::dcscaledsec_div_ss ( type(dc_scaled_sec), intent(in)  sclsec,
type(dc_scaled_sec), intent(in)  factor 
)

Definition at line 1505 of file dc_scaledsec.f90.

1505  !
1506  ! DC_SCALED_SEC 型変数の除算.
1507  !
1508  ! Division of a "DC_SCALED_SEC" variable
1509  !
1510  use dc_message, only: messagenotify
1511  implicit none
1512  type(dc_scaled_sec), intent(in):: sclsec, factor
1513  real(DP):: factor_abs
1514  continue
1515 
1516  ! frt, ifort などでは, 1.0e+23 などの実数とすると,
1517  ! 9.9999e+22 などとなってしまうため,
1518  ! factor として指定するものは 10e+12 までとする. (うーむ, 汚い対応だな....)
1519  ! (morikawa 2008/09/01)
1520  !
1521  if ( .not. all( factor % sec_ary (imax-4:imax) == (/ 0, 0, 0, 0, 0 /) ) ) then
1522  call messagenotify( 'E', 'dc_scaledsec#mod', &
1523  & 'factor must be smaller than 10^12' )
1524  end if
1525 
1526  factor_abs = factor
1527  result = sclsec / factor_abs
1528 

◆ dcscaledsec_eq_ss()

logical function dc_scaledsec::dcscaledsec_eq_ss ( type(dc_scaled_sec), intent(in)  sclsec1,
type(dc_scaled_sec), intent(in)  sclsec2 
)

Definition at line 424 of file dc_scaledsec.f90.

424  !
425  ! 2 つの DC_SCALED_SEC 型変数の比較
426  !
427  ! Comparison of two "DC_SCALED_SEC" variables
428  !
429  implicit none
430  type(dc_scaled_sec), intent(in):: sclsec1, sclsec2
431 
432  integer:: i
433  continue
434  if ( sclsec1 % flag_negative .and. .not. sclsec2 % flag_negative ) then
435  result = .false.
436 
437  return
438  elseif ( .not. sclsec1 % flag_negative .and. sclsec2 % flag_negative ) then
439  result = .false.
440  return
441  end if
442 
443  do i = imax, imin, -1
444  if ( .not. sclsec1 % sec_ary(i) == sclsec2 % sec_ary(i) ) then
445  result = .false.
446  return
447  end if
448  end do
449 
450  result = .true.

◆ dcscaledsec_mod_sd()

type(dc_scaled_sec) function dc_scaledsec::dcscaledsec_mod_sd ( type(dc_scaled_sec), intent(in)  sclsec,
real(dp), intent(in)  factor 
)

Definition at line 1728 of file dc_scaledsec.f90.

1728  !
1729  ! DC_SCALED_SEC 型変数を割った際の余りを計算.
1730  !
1731  ! Calculate of remainder by division of a "DC_SCALED_SEC" variable
1732  !
1733  use dc_message, only: messagenotify
1734  implicit none
1735  type(dc_scaled_sec), intent(in):: sclsec
1736  real(DP), intent(in):: factor
1737  type(dc_scaled_sec):: factor_scl
1738 
1739  continue
1740  factor_scl = factor
1741  result = mod( sclsec, factor_scl )

◆ dcscaledsec_mod_si()

type(dc_scaled_sec) function dc_scaledsec::dcscaledsec_mod_si ( type(dc_scaled_sec), intent(in)  sclsec,
integer, intent(in)  factor 
)

Definition at line 1690 of file dc_scaledsec.f90.

1690  !
1691  ! DC_SCALED_SEC 型変数を割った際の余りを計算.
1692  !
1693  ! Calculate of remainder by division of a "DC_SCALED_SEC" variable
1694  !
1695  use dc_message, only: messagenotify
1696  implicit none
1697  type(dc_scaled_sec), intent(in):: sclsec
1698  integer, intent(in):: factor
1699  type(dc_scaled_sec):: factor_scl
1700 
1701  continue
1702  factor_scl = factor
1703  result = mod( sclsec, factor_scl )

◆ dcscaledsec_mod_sr()

type(dc_scaled_sec) function dc_scaledsec::dcscaledsec_mod_sr ( type(dc_scaled_sec), intent(in)  sclsec,
real, intent(in)  factor 
)

Definition at line 1709 of file dc_scaledsec.f90.

1709  !
1710  ! DC_SCALED_SEC 型変数を割った際の余りを計算.
1711  !
1712  ! Calculate of remainder by division of a "DC_SCALED_SEC" variable
1713  !
1714  use dc_message, only: messagenotify
1715  implicit none
1716  type(dc_scaled_sec), intent(in):: sclsec
1717  real, intent(in):: factor
1718  type(dc_scaled_sec):: factor_scl
1719 
1720  continue
1721  factor_scl = factor
1722  result = mod( sclsec, factor_scl )

◆ dcscaledsec_mod_ss()

type(dc_scaled_sec) function dc_scaledsec::dcscaledsec_mod_ss ( type(dc_scaled_sec), intent(in)  sclsec,
type(dc_scaled_sec), intent(in)  factor 
)

Definition at line 1618 of file dc_scaledsec.f90.

1618  !
1619  ! DC_SCALED_SEC 型変数を割った際の余りを計算.
1620  !
1621  ! Calculate of remainder by division of a "DC_SCALED_SEC" variable
1622  !
1623  use dc_message, only: messagenotify
1624  implicit none
1625  type(dc_scaled_sec), intent(in):: sclsec, factor
1626 
1627  type(dc_scaled_sec):: factor_scl
1628  real(DP):: sec_ary_mod(imin+imin:imax)
1629  integer:: i, move_down_index
1630  real(DP):: move_down
1631  real(DP):: factor_dp
1632  type(dc_scaled_sec):: zero_sec
1633  continue
1634 
1635  ! frt, ifort などでは, 1.0e+23 などの実数とすると,
1636  ! 9.9999e+22 などとなってしまうため,
1637  ! factor として指定するものは 10e+12 までとする. (うーむ, 汚い対応だな....)
1638  ! (morikawa 2008/09/01)
1639  !
1640  if ( .not. all( factor % sec_ary (imax-4:imax) == (/ 0, 0, 0, 0, 0 /) ) ) then
1641  call messagenotify( 'E', 'dc_scaledsec#mod', &
1642  & 'factor must be smaller than 10^12' )
1643  end if
1644 
1645  if ( sclsec == factor ) then
1646  result = zero_sec
1647  return
1648  end if
1649 
1650  factor_scl % sec_ary(imin:-1) = 0
1651  factor_scl % sec_ary(imin-imin:imax) = factor % sec_ary(imin:imax+imin)
1652  factor_scl % flag_negative = factor % flag_negative
1653 
1654  factor_dp = factor_scl
1655 
1656  move_down = 0.0_dp
1657  do i = imax, imin + imin, -1
1658  move_down_index = i
1659  if ( move_down /= 0.0_dp ) then
1660  if ( abs(factor_dp) > ( move_down + scale_factor ) * scale_factor_xx( i - imin ) ) exit
1661  end if
1662 
1663  if ( i > imin - 1 ) then
1664  sec_ary_mod(i) = &
1665  & mod( ( sclsec % sec_ary(i) + move_down ), factor_dp )
1666  else
1667  sec_ary_mod(i) = mod( move_down, factor_dp )
1668  end if
1669 
1670  if ( sec_ary_mod(i) /= 0.0_dp ) then
1671  move_down = sec_ary_mod(i) * scale_factor
1672  else
1673  move_down = 0.0_dp
1674  end if
1675 
1676  end do
1677 
1678  result = move_down * scale_factor_xx(move_down_index)
1679  if ( move_down_index > imin - 1 ) then
1680  result % sec_ary(imin:move_down_index) = sclsec % sec_ary(imin:move_down_index)
1681  end if
1682 
1683  result % flag_negative = sclsec % flag_negative
1684 

◆ dcscaledsec_modulo_sd()

type(dc_scaled_sec) function dc_scaledsec::dcscaledsec_modulo_sd ( type(dc_scaled_sec), intent(in)  sclsec,
real(dp), intent(in)  factor 
)

Definition at line 1872 of file dc_scaledsec.f90.

1872  !
1873  ! DC_SCALED_SEC 型変数を割った際の剰余を計算.
1874  !
1875  ! Calculate of remainder by division of a "DC_SCALED_SEC" variable
1876  !
1877  use dc_message, only: messagenotify
1878  implicit none
1879  type(dc_scaled_sec), intent(in):: sclsec
1880  real(DP), intent(in):: factor
1881  type(dc_scaled_sec):: factor_scl
1882 
1883  continue
1884  factor_scl = factor
1885  result = modulo( sclsec, factor_scl )

◆ dcscaledsec_modulo_si()

type(dc_scaled_sec) function dc_scaledsec::dcscaledsec_modulo_si ( type(dc_scaled_sec), intent(in)  sclsec,
integer, intent(in)  factor 
)

Definition at line 1834 of file dc_scaledsec.f90.

1834  !
1835  ! DC_SCALED_SEC 型変数を割った際の剰余を計算.
1836  !
1837  ! Calculate of remainder by division of a "DC_SCALED_SEC" variable
1838  !
1839  use dc_message, only: messagenotify
1840  implicit none
1841  type(dc_scaled_sec), intent(in):: sclsec
1842  integer, intent(in):: factor
1843  type(dc_scaled_sec):: factor_scl
1844 
1845  continue
1846  factor_scl = factor
1847  result = modulo( sclsec, factor_scl )

◆ dcscaledsec_modulo_sr()

type(dc_scaled_sec) function dc_scaledsec::dcscaledsec_modulo_sr ( type(dc_scaled_sec), intent(in)  sclsec,
real, intent(in)  factor 
)

Definition at line 1853 of file dc_scaledsec.f90.

1853  !
1854  ! DC_SCALED_SEC 型変数を割った際の剰余を計算.
1855  !
1856  ! Calculate of remainder by division of a "DC_SCALED_SEC" variable
1857  !
1858  use dc_message, only: messagenotify
1859  implicit none
1860  type(dc_scaled_sec), intent(in):: sclsec
1861  real, intent(in):: factor
1862  type(dc_scaled_sec):: factor_scl
1863 
1864  continue
1865  factor_scl = factor
1866  result = modulo( sclsec, factor_scl )

◆ dcscaledsec_modulo_ss()

type(dc_scaled_sec) function dc_scaledsec::dcscaledsec_modulo_ss ( type(dc_scaled_sec), intent(in)  sclsec,
type(dc_scaled_sec), intent(in)  factor 
)

Definition at line 1747 of file dc_scaledsec.f90.

1747  !
1748  ! DC_SCALED_SEC 型変数を割った際の剰余を計算.
1749  !
1750  ! Calculate of remainder by division of a "DC_SCALED_SEC" variable
1751  !
1752  use dc_message, only: messagenotify
1753  implicit none
1754  type(dc_scaled_sec), intent(in):: sclsec, factor
1755 
1756  type(dc_scaled_sec):: factor_scl
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
1761  type(dc_scaled_sec):: zero_sec
1762  continue
1763 
1764  ! frt, ifort などでは, 1.0e+23 などの実数とすると,
1765  ! 9.9999e+22 などとなってしまうため,
1766  ! factor として指定するものは 10e+12 までとする. (うーむ, 汚い対応だな....)
1767  ! (morikawa 2008/09/01)
1768  !
1769  if ( .not. all( factor % sec_ary (imax-4:imax) == (/ 0, 0, 0, 0, 0 /) ) ) then
1770  call messagenotify( 'E', 'dc_scaledsec#modulo', &
1771  & 'factor must be smaller than 10^12' )
1772  end if
1773 
1774  if ( sclsec == factor ) then
1775  result = zero_sec
1776  return
1777  end if
1778 
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
1782 
1783  factor_dp = factor_scl
1784 
1785  move_down = 0.0_dp
1786  do i = imax, imin + imin, -1
1787  move_down_index = i
1788  if ( move_down /= 0.0_dp ) then
1789  if ( abs(factor_dp) > ( move_down + scale_factor ) * scale_factor_xx( i - imin ) ) exit
1790  end if
1791 
1792  if ( i > imin - 1 ) then
1793  sec_ary_mod(i) = &
1794  & mod( ( sclsec % sec_ary(i) + move_down ), factor_dp )
1795  else
1796  sec_ary_mod(i) = mod( move_down, factor_dp )
1797  end if
1798 
1799  if ( sec_ary_mod(i) /= 0.0_dp ) then
1800  move_down = sec_ary_mod(i) * scale_factor
1801  else
1802  move_down = 0.0_dp
1803  end if
1804 
1805  end do
1806 
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)
1810  end if
1811 
1812  result % flag_negative = .false.
1813 
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
1818 
1819  elseif ( sclsec % flag_negative .and. .not. factor % flag_negative ) then
1820  result = factor - result
1821  result % flag_negative = .not. sclsec % flag_negative
1822 
1823  else
1824  result % flag_negative = sclsec % flag_negative
1825 
1826  end if
1827  end if
1828 

◆ dcscaledsec_mul_ds()

type(dc_scaled_sec) function dc_scaledsec::dcscaledsec_mul_ds ( real(dp), intent(in)  factor,
type(dc_scaled_sec), intent(in)  sclsec 
)

Definition at line 1455 of file dc_scaledsec.f90.

1455  !
1456  ! DC_SCALED_SEC 型変数の乗算.
1457  !
1458  ! Multiplication of a "DC_SCALED_SEC" variable
1459  !
1460  use dc_message, only: messagenotify
1461  implicit none
1462  real(DP), intent(in):: factor
1463  type(dc_scaled_sec), intent(in):: sclsec
1464  continue
1465  result = sclsec * factor

◆ dcscaledsec_mul_is()

type(dc_scaled_sec) function dc_scaledsec::dcscaledsec_mul_is ( integer, intent(in)  factor,
type(dc_scaled_sec), intent(in)  sclsec 
)

Definition at line 1422 of file dc_scaledsec.f90.

1422  !
1423  ! DC_SCALED_SEC 型変数の乗算.
1424  !
1425  ! Multiplication of a "DC_SCALED_SEC" variable
1426  !
1427  implicit none
1428  integer, intent(in):: factor
1429  type(dc_scaled_sec), intent(in):: sclsec
1430  continue
1431  result = sclsec * factor

◆ dcscaledsec_mul_rs()

type(dc_scaled_sec) function dc_scaledsec::dcscaledsec_mul_rs ( real, intent(in)  factor,
type(dc_scaled_sec), intent(in)  sclsec 
)

Definition at line 1489 of file dc_scaledsec.f90.

1489  !
1490  ! DC_SCALED_SEC 型変数の乗算.
1491  !
1492  ! Multiplication of a "DC_SCALED_SEC" variable
1493  !
1494  use dc_message, only: messagenotify
1495  implicit none
1496  real, intent(in):: factor
1497  type(dc_scaled_sec), intent(in):: sclsec
1498  continue
1499  result = sclsec * factor

◆ dcscaledsec_mul_si()

type(dc_scaled_sec) function dc_scaledsec::dcscaledsec_mul_si ( type(dc_scaled_sec), intent(in)  sclsec,
integer, intent(in)  factor 
)

Definition at line 1368 of file dc_scaledsec.f90.

1368  !
1369  ! DC_SCALED_SEC 型変数の乗算.
1370  !
1371  ! Multiplication of a "DC_SCALED_SEC" variable
1372  !
1373  !--
1374  ! 高速化のため, mul_ss を使用しない.
1375  !++
1376  use dc_message, only: messagenotify
1377  implicit none
1378  type(dc_scaled_sec), intent(in):: sclsec
1379  integer, intent(in):: factor
1380  integer:: factor_abs
1381  type(dc_scaled_sec):: zero_sec
1382  real(DP):: sec_ary_dp(imin:imax)
1383  integer:: i, move_up
1384  continue
1385  if ( sclsec == zero_sec .or. factor == 0 ) then
1386  result = zero_sec
1387  return
1388  end if
1389 
1390  if ( sclsec % flag_negative ) then
1391  result % flag_negative = .not. factor < 0
1392  else
1393  result % flag_negative = factor < 0
1394  end if
1395  factor_abs = abs(factor)
1396 
1397  move_up = 0
1398  sec_ary_dp(:) = 0.0_dp
1399  do i = imin, imax
1400  sec_ary_dp(i) = sclsec % sec_ary(i) * factor_abs + move_up
1401 
1402  if ( .not. sec_ary_dp(i) < scale_factor ) then
1403  move_up = int( sec_ary_dp(i) / scale_factor )
1404  sec_ary_dp(i) = sec_ary_dp(i) - move_up * scale_factor
1405  else
1406  move_up = 0
1407  end if
1408  end do
1409 
1410  if ( move_up /= 0 ) then
1411  call messagenotify( 'E', operator'dc_scaledsec#(*)', &
1412  & 'DC_SCALED_SEC must be smaller than 10^24' )
1413  end if
1414 
1415  result % sec_ary(imin:imax) = sec_ary_dp(imin:imax)
1416 

◆ dcscaledsec_mul_sr()

type(dc_scaled_sec) function dc_scaledsec::dcscaledsec_mul_sr ( type(dc_scaled_sec), intent(in)  sclsec,
real, intent(in)  factor 
)

Definition at line 1471 of file dc_scaledsec.f90.

1471  !
1472  ! DC_SCALED_SEC 型変数の乗算.
1473  !
1474  ! Multiplication of a "DC_SCALED_SEC" variable
1475  !
1476  use dc_message, only: messagenotify
1477  implicit none
1478  type(dc_scaled_sec), intent(in):: sclsec
1479  real, intent(in):: factor
1480  type(dc_scaled_sec):: factor_scl
1481  continue
1482  factor_scl = factor
1483  result = sclsec * factor_scl

◆ dcscaledsecputline()

subroutine, public dc_scaledsec::dcscaledsecputline ( type(dc_scaled_sec), intent(in)  sclsec,
integer, intent(in), optional  unit,
character(*), intent(in), optional  indent 
)

Definition at line 343 of file dc_scaledsec.f90.

References dc_types::stdout, and dc_types::string.

343  !
344  ! 引数 *sclsec* に設定されている情報を印字します.
345  ! デフォルトではメッセージは標準出力に出力されます.
346  ! *unit* に装置番号を指定することで, 出力先を変更することが可能です.
347  !
348  ! Print information of *sclsec*.
349  ! By default messages are output to standard output.
350  ! Unit number for output can be changed by *unit* argument.
351  !
352  use dc_string, only: printf, tochar
353  use dc_trace, only: beginsub, endsub
354  use dc_types, only: stdout, string
355  implicit none
356  type(dc_scaled_sec), intent(in) :: sclsec
357  integer, intent(in), optional :: unit
358  ! 出力先の装置番号.
359  ! デフォルトの出力先は標準出力.
360  !
361  ! Unit number for output.
362  ! Default value is standard output.
363  character(*), intent(in), optional:: indent
364  ! 表示されるメッセージの字下げ.
365  !
366  ! Indent of displayed messages.
367 
368  integer :: out_unit, sec_ary_rev(imin:imax)
369  integer:: indent_len
370  character(STRING):: indent_str
371  character(1):: sign
372  character(*), parameter:: subname = 'DCScaledSecPutLine'
373  continue
374  !call BeginSub(subname)
375 
376  if (present(unit)) then
377  out_unit = unit
378  else
379  out_unit = stdout
380  end if
381 
382  indent_len = 0
383  indent_str = ''
384  if ( present(indent) ) then
385  if ( len(indent) /= 0 ) then
386  indent_len = len(indent)
387  indent_str(1:indent_len) = indent
388  end if
389  end if
390 
391  sec_ary_rev(imin:imax) = sclsec % sec_ary(imax:imin:-1)
392  if ( sclsec % flag_negative ) then
393  sign = '-'
394  else
395  sign = '+'
396  end if
397  if ( imax - imin + 1 == 6 ) then
398  call printf(out_unit, &
399  & indent_str(1:indent_len) // &
400  & '#<DC_SCALED_SEC:: @sign=%c @yotta=%d @exa=%d @tera=%d @mega=%d @base=%d @micro=%d>', &
401  & i = sec_ary_rev, c1 = sign )
402  elseif ( imax - imin + 1 == 11 ) then
403  call printf(out_unit, &
404  & indent_str(1:indent_len) // &
405  & '#<DC_SCALED_SEC:: @sign=%c @yotta=%d @zetta=%d @exa=%d @peta=%d @tera=%d', &
406  & i = sec_ary_rev(imin:imin+4), c1 = sign )
407  call printf(out_unit, &
408  & indent_str(1:indent_len) // &
409  & ' @giga=%d @mega=%d @kilo=%d @base=%d @milli=%d @micro=%d>', &
410  & i = sec_ary_rev(imax-5:imax) )
411  else
412  call printf(out_unit, &
413  & indent_str(1:indent_len) // &
414  & '#<DC_SCALED_SEC:: @sign=%c @sec_ary=%*d>', &
415  & i = sec_ary_rev, n = (/ imax - imin + 1 /), c1 = sign )
416  end if
417  999 continue
418  !call EndSub(subname)
integer, parameter, public stdout
Unit number for Standard OUTPUT.
Definition: dc_types.f90:98
Provides kind type parameter values.
Definition: dc_types.f90:49
integer, parameter, public string
Character length for string.
Definition: dc_types.f90:118

◆ dcscaledsectonumd()

subroutine dc_scaledsec::dcscaledsectonumd ( real(dp), intent(out)  sec,
type(dc_scaled_sec), intent(in)  sclsec 
)

Definition at line 326 of file dc_scaledsec.f90.

References dc_types::dp.

326  use dc_types, only: dp
327  implicit none
328  real(DP), intent(out):: sec
329  type(dc_scaled_sec), intent(in):: sclsec
330 
331  integer:: i
332  continue
333  sec = 0.0_dp
334  do i = imax, imin, -1
335  sec = sec + ( sclsec % sec_ary(i) * scale_factor_xx(i) )
336  end do
337  if ( sclsec % flag_negative ) sec = - sec
integer, parameter, public dp
Double Precision Real number.
Definition: dc_types.f90:83
Provides kind type parameter values.
Definition: dc_types.f90:49

◆ dcscaledsectonumi()

subroutine dc_scaledsec::dcscaledsectonumi ( integer, intent(out)  sec,
type(dc_scaled_sec), intent(in)  sclsec 
)

Definition at line 300 of file dc_scaledsec.f90.

References dcscaledsectonumd(), and dc_types::dp.

300  use dc_types, only: dp
301  implicit none
302  integer, intent(out):: sec
303  type(dc_scaled_sec), intent(in):: sclsec
304  real(DP):: secd
305  continue
306  call dcscaledsectonumd(secd, sclsec)
307  sec = nint( secd )
integer, parameter, public dp
Double Precision Real number.
Definition: dc_types.f90:83
Provides kind type parameter values.
Definition: dc_types.f90:49
Here is the call graph for this function:

◆ dcscaledsectonumr()

subroutine dc_scaledsec::dcscaledsectonumr ( real, intent(out)  sec,
type(dc_scaled_sec), intent(in)  sclsec 
)

Definition at line 313 of file dc_scaledsec.f90.

References dcscaledsectonumd(), and dc_types::dp.

313  use dc_types, only: dp
314  implicit none
315  real, intent(out):: sec
316  type(dc_scaled_sec), intent(in):: sclsec
317  real(DP):: secd
318  continue
319  call dcscaledsectonumd(secd, sclsec)
320  sec = real( secd )
integer, parameter, public dp
Double Precision Real number.
Definition: dc_types.f90:83
Provides kind type parameter values.
Definition: dc_types.f90:49
Here is the call graph for this function: