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_add_ss (sclsec1, sclsec2)
type(dc_scaled_sec) function dcscaledsec_add_si (sclsec, factor)
type(dc_scaled_sec) function dcscaledsec_add_is (factor, sclsec)
type(dc_scaled_sec) function dcscaledsec_add_sr (sclsec, factor)
type(dc_scaled_sec) function dcscaledsec_add_rs (factor, sclsec)
type(dc_scaled_sec) function dcscaledsec_add_sd (sclsec, factor)
type(dc_scaled_sec) function dcscaledsec_add_ds (factor, sclsec)

Detailed Description

Definition at line 183 of file dc_scaledsec.f90.

Member Function/Subroutine Documentation

◆ dcscaledsec_add_ds()

type(dc_scaled_sec) function dc_scaledsec::operator(+)::dcscaledsec_add_ds ( real(dp), intent(in) factor,
type(dc_scaled_sec), intent(in) sclsec )

Add double precision real and DC_SCALED_SEC

Parameters
[in]factorDouble precision value to add
[in]sclsecDC_SCALED_SEC variable
Returns
Sum of double and DC_SCALED_SEC

Definition at line 1315 of file dc_scaledsec.f90.

1316 implicit none
1317 real(DP), intent(in):: factor
1318 type(DC_SCALED_SEC), intent(in):: sclsec
1319 type(DC_SCALED_SEC):: factor_scl
1320 continue
1321 factor_scl = factor
1322 result = sclsec + factor_scl

◆ dcscaledsec_add_is()

type(dc_scaled_sec) function dc_scaledsec::operator(+)::dcscaledsec_add_is ( integer, intent(in) factor,
type(dc_scaled_sec), intent(in) sclsec )

Add integer and DC_SCALED_SEC

Parameters
[in]factorInteger value to add
[in]sclsecDC_SCALED_SEC variable
Returns
Sum of integer and DC_SCALED_SEC

Definition at line 1215 of file dc_scaledsec.f90.

1216 implicit none
1217 integer, intent(in):: factor
1218 type(DC_SCALED_SEC), intent(in):: sclsec
1219 type(DC_SCALED_SEC):: factor_scl
1220 continue
1221 factor_scl = factor
1222 result = factor_scl + sclsec

◆ dcscaledsec_add_rs()

type(dc_scaled_sec) function dc_scaledsec::operator(+)::dcscaledsec_add_rs ( real, intent(in) factor,
type(dc_scaled_sec), intent(in) sclsec )

Add single precision real and DC_SCALED_SEC

Parameters
[in]factorReal value to add
[in]sclsecDC_SCALED_SEC variable
Returns
Sum of real and DC_SCALED_SEC

Definition at line 1265 of file dc_scaledsec.f90.

1266 implicit none
1267 real, intent(in):: factor
1268 type(DC_SCALED_SEC), intent(in):: sclsec
1269 type(DC_SCALED_SEC):: factor_scl
1270 continue
1271 factor_scl = factor
1272 result = sclsec + factor_scl

◆ dcscaledsec_add_sd()

type(dc_scaled_sec) function dc_scaledsec::operator(+)::dcscaledsec_add_sd ( type(dc_scaled_sec), intent(in) sclsec,
real(dp), intent(in) factor )

Add DC_SCALED_SEC and double precision real

Parameters
[in]sclsecDC_SCALED_SEC variable
[in]factorDouble precision value to add
Returns
Sum of DC_SCALED_SEC and double

Definition at line 1290 of file dc_scaledsec.f90.

1291 implicit none
1292 type(DC_SCALED_SEC), intent(in):: sclsec
1293 real(DP), intent(in):: factor
1294 type(DC_SCALED_SEC):: factor_scl
1295 continue
1296 factor_scl = factor
1297 result = sclsec + factor_scl

◆ dcscaledsec_add_si()

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

Add DC_SCALED_SEC and integer

Parameters
[in]sclsecDC_SCALED_SEC variable
[in]factorInteger value to add
Returns
Sum of DC_SCALED_SEC and integer

Definition at line 1190 of file dc_scaledsec.f90.

1191 implicit none
1192 type(DC_SCALED_SEC), intent(in):: sclsec
1193 integer, intent(in):: factor
1194 type(DC_SCALED_SEC):: factor_scl
1195 continue
1196 factor_scl = factor
1197 result = sclsec + factor_scl

◆ dcscaledsec_add_sr()

type(dc_scaled_sec) function dc_scaledsec::operator(+)::dcscaledsec_add_sr ( type(dc_scaled_sec), intent(in) sclsec,
real, intent(in) factor )

Add DC_SCALED_SEC and single precision real

Parameters
[in]sclsecDC_SCALED_SEC variable
[in]factorReal value to add
Returns
Sum of DC_SCALED_SEC and real

Definition at line 1240 of file dc_scaledsec.f90.

1241 implicit none
1242 type(DC_SCALED_SEC), intent(in):: sclsec
1243 real, intent(in):: factor
1244 type(DC_SCALED_SEC):: factor_scl
1245 continue
1246 factor_scl = factor
1247 result = sclsec + factor_scl

◆ dcscaledsec_add_ss()

type(dc_scaled_sec) function dc_scaledsec::operator(+)::dcscaledsec_add_ss ( type(dc_scaled_sec), intent(in) sclsec1,
type(dc_scaled_sec), intent(in) sclsec2 )

Add two DC_SCALED_SEC variables

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

Definition at line 1118 of file dc_scaledsec.f90.

1119 use dc_message, only: messagenotify
1120 implicit none
1121 type(DC_SCALED_SEC), intent(in):: sclsec1, sclsec2
1122
1123 integer:: i, move_up
1124 logical:: both_negative, sclsec2_flag_negative
1125 type(DC_SCALED_SEC):: sclsec1_opsign, sclsec2_opsign
1126 continue
1127 move_up = 0
1128 both_negative = .false.
1129
1130 ! 負の値の処理
1131 ! Handle negative value
1132 !
1133 sclsec2_flag_negative = sclsec2 % flag_negative
1134 if ( sclsec1 % flag_negative ) then
1135 both_negative = .true.
1136 sclsec2_flag_negative = .not. sclsec2_flag_negative
1137 end if
1138 if ( sclsec2_flag_negative ) then
1139 sclsec1_opsign = sclsec1
1140 sclsec1_opsign % flag_negative = .false.
1141 sclsec2_opsign = sclsec2
1142 sclsec2_opsign % flag_negative = .false.
1143 result = sclsec1_opsign - sclsec2_opsign
1144 if ( both_negative ) then
1145 result % flag_negative = .not. result % flag_negative
1146 end if
1147 return
1148 end if
1149
1150 ! 加算
1151 ! Addition
1152 !
1153 do i = imin, imax
1154 result % sec_ary(i) = sclsec1 % sec_ary(i) + sclsec2 % sec_ary(i) + move_up
1155 if ( .not. result % sec_ary(i) < scale_factor_int ) then
1156 if ( i == imax ) then
1157 call messagenotify( 'E', 'dc_scaledsec#operator(*)', &
1158 & 'DC_SCALED_SEC must be smaller than 10^24' )
1159 end if
1160 move_up = result % sec_ary(i) / scale_factor_int
1161 result % sec_ary(i) = mod( result % sec_ary(i), scale_factor_int )
1162 else
1163 move_up = 0
1164 end if
1165 end do
1166
1167 if ( both_negative ) then
1168 result % flag_negative = .true.
1169 else
1170 result % flag_negative = .false.
1171 end if
1172
Message output module.

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