gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
Loading...
Searching...
No Matches
dc_scaledsec::operator(*) Interface Reference

Public Member Functions

type(dc_scaled_sec) function dcscaledsec_mul_ss (sclsec1, sclsec2)
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_sd (sclsec, factor)
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)

Detailed Description

Definition at line 204 of file dc_scaledsec.f90.

Member Function/Subroutine Documentation

◆ dcscaledsec_mul_ds()

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

Multiply double precision by DC_SCALED_SEC

Parameters
[in]factorDouble precision multiplier
[in]sclsecDC_SCALED_SEC variable
Returns
Product of double and DC_SCALED_SEC

Definition at line 1789 of file dc_scaledsec.f90.

1790 use dc_message, only: messagenotify
1791 implicit none
1792 real(DP), intent(in):: factor
1793 type(DC_SCALED_SEC), intent(in):: sclsec
1794 continue
1795 result = sclsec * factor
Message output module.

◆ dcscaledsec_mul_is()

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

Multiply integer by DC_SCALED_SEC

Parameters
[in]factorInteger multiplier
[in]sclsecDC_SCALED_SEC variable
Returns
Product of integer and DC_SCALED_SEC

Definition at line 1740 of file dc_scaledsec.f90.

1741 implicit none
1742 integer, intent(in):: factor
1743 type(DC_SCALED_SEC), intent(in):: sclsec
1744 continue
1745 result = sclsec * factor

◆ dcscaledsec_mul_rs()

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

Multiply single precision real by DC_SCALED_SEC

Parameters
[in]factorSingle precision multiplier
[in]sclsecDC_SCALED_SEC variable
Returns
Product of real and DC_SCALED_SEC

Definition at line 1839 of file dc_scaledsec.f90.

1840 use dc_message, only: messagenotify
1841 implicit none
1842 real, intent(in):: factor
1843 type(DC_SCALED_SEC), intent(in):: sclsec
1844 continue
1845 result = sclsec * factor

◆ dcscaledsec_mul_sd()

type(dc_scaled_sec) function dc_scaledsec::operator(*)::dcscaledsec_mul_sd ( type(dc_scaled_sec), intent(in) sclsec,
real(dp), intent(in) factor )

Multiply DC_SCALED_SEC by double precision

Parameters
[in]sclsecDC_SCALED_SEC variable
[in]factorDouble precision multiplier
Returns
Product of DC_SCALED_SEC and double

Definition at line 1763 of file dc_scaledsec.f90.

1764 use dc_message, only: messagenotify
1765 implicit none
1766 type(DC_SCALED_SEC), intent(in):: sclsec
1767 real(DP), intent(in):: factor
1768 type(DC_SCALED_SEC):: factor_scl
1769 continue
1770 factor_scl = factor
1771 result = sclsec * factor_scl

◆ dcscaledsec_mul_si()

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

Multiply DC_SCALED_SEC by integer

Optimized implementation without using mul_ss for performance.

Parameters
[in]sclsecDC_SCALED_SEC variable
[in]factorInteger multiplier
Returns
Product of DC_SCALED_SEC and integer

Definition at line 1681 of file dc_scaledsec.f90.

1682 use dc_message, only: messagenotify
1683 implicit none
1684 type(DC_SCALED_SEC), intent(in):: sclsec
1685 integer, intent(in):: factor
1686 integer:: factor_abs
1687 type(DC_SCALED_SEC):: zero_sec
1688 real(DP):: sec_ary_dp(imin:imax)
1689 integer:: i, move_up
1690 continue
1691 if ( sclsec == zero_sec .or. factor == 0 ) then
1692 result = zero_sec
1693 return
1694 end if
1695
1696 if ( sclsec % flag_negative ) then
1697 result % flag_negative = .not. factor < 0
1698 else
1699 result % flag_negative = factor < 0
1700 end if
1701 factor_abs = abs(factor)
1702
1703 move_up = 0
1704 sec_ary_dp(:) = 0.0_dp
1705 do i = imin, imax
1706 sec_ary_dp(i) = sclsec % sec_ary(i) * factor_abs + move_up
1707
1708 if ( .not. sec_ary_dp(i) < scale_factor ) then
1709 move_up = int( sec_ary_dp(i) / scale_factor )
1710 sec_ary_dp(i) = sec_ary_dp(i) - move_up * scale_factor
1711 else
1712 move_up = 0
1713 end if
1714 end do
1715
1716 if ( move_up /= 0 ) then
1717 call messagenotify( 'E', 'dc_scaledsec#operator(*)', &
1718 & 'DC_SCALED_SEC must be smaller than 10^24' )
1719 end if
1720
1721 result % sec_ary(imin:imax) = nint( sec_ary_dp(imin:imax) )
1722

◆ dcscaledsec_mul_sr()

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

Multiply DC_SCALED_SEC by single precision real

Parameters
[in]sclsecDC_SCALED_SEC variable
[in]factorSingle precision multiplier
Returns
Product of DC_SCALED_SEC and real

Definition at line 1813 of file dc_scaledsec.f90.

1814 use dc_message, only: messagenotify
1815 implicit none
1816 type(DC_SCALED_SEC), intent(in):: sclsec
1817 real, intent(in):: factor
1818 type(DC_SCALED_SEC):: factor_scl
1819 continue
1820 factor_scl = factor
1821 result = sclsec * factor_scl

◆ dcscaledsec_mul_ss()

type(dc_scaled_sec) function dc_scaledsec::operator(*)::dcscaledsec_mul_ss ( type(dc_scaled_sec), intent(in), target sclsec1,
type(dc_scaled_sec), intent(in), target sclsec2 )

Multiply two DC_SCALED_SEC variables

Parameters
[in]sclsec1First DC_SCALED_SEC variable
[in]sclsec2Second DC_SCALED_SEC variable
Returns
Product of two DC_SCALED_SEC variables

Definition at line 1598 of file dc_scaledsec.f90.

1599 use dc_message, only: messagenotify
1600 implicit none
1601 type(DC_SCALED_SEC), intent(in), target:: sclsec1, sclsec2
1602 integer:: sec_ary_int(imin:imax,imin:imax)
1603! real(DP):: sec_ary_int(imin:imax,imin:imax)
1604 integer:: i, j, move_up
1605 type(DC_SCALED_SEC):: zero_sec
1606 continue
1607 if ( sclsec1 == zero_sec .or. sclsec2 == zero_sec ) then
1608 result = zero_sec
1609 return
1610 end if
1611
1612 if ( sclsec1 % flag_negative ) then
1613 result % flag_negative = .not. sclsec2 % flag_negative
1614 else
1615 result % flag_negative = sclsec2 % flag_negative
1616 end if
1617
1618 move_up = 0
1619 sec_ary_int(:,:) = 0
1620 do i = imin, imax
1621 do j = imin, imax
1622 sec_ary_int(i,j) = &
1623 & sclsec1 % sec_ary(j) * sclsec2 % sec_ary(i) + move_up
1624 if ( i + j > imax .and. sec_ary_int(i,j) /= 0 ) then
1625 call messagenotify( 'E', 'dc_scaledsec#operator(*)', &
1626 & 'DC_SCALED_SEC must be smaller than 10^24' )
1627 end if
1628 if ( .not. sec_ary_int(i,j) < scale_factor ) then
1629 move_up = int( sec_ary_int(i,j) / scale_factor_int )
1630 sec_ary_int(i,j) = sec_ary_int(i,j) - move_up * scale_factor_int
1631 else
1632 move_up = 0
1633 end if
1634 end do
1635 end do
1636
1637 result % sec_ary = 0
1638 do i = imin, imax
1639 do j = imin, imax
1640 if ( i + j < imin ) cycle
1641 if ( i + j > imax ) cycle
1642 result % sec_ary(i+j) = result % sec_ary(i+j) + sec_ary_int(i,j)
1643 end do
1644 end do
1645
1646 move_up = 0
1647 do i = imin, imax
1648 result % sec_ary(i) = result % sec_ary(i) + move_up
1649 move_up = 0
1650 do while ( .not. result % sec_ary(i) < scale_factor_int )
1651 if ( i == imax ) then
1652 call messagenotify( 'E', 'dc_scaledsec#operator(*)', &
1653 & 'DC_SCALED_SEC must be smaller than 10^24' )
1654 end if
1655 result % sec_ary(i) = result % sec_ary(i) - scale_factor_int
1656 move_up = move_up + 1
1657 end do
1658 end do
1659

The documentation for this interface was generated from the following file: