gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
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 )

倍精度実数と DC_SCALED_SEC の加算

Parameters
[in]factor加算する倍精度実数値
[in]sclsecDC_SCALED_SEC 型変数
Returns
倍精度実数と 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 )

整数と DC_SCALED_SEC の加算

Parameters
[in]factor加算する整数値
[in]sclsecDC_SCALED_SEC 型変数
Returns
整数と 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 )

単精度実数と DC_SCALED_SEC の加算

Parameters
[in]factor加算する実数値
[in]sclsecDC_SCALED_SEC 型変数
Returns
実数と 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 )

DC_SCALED_SEC と倍精度実数の加算

Parameters
[in]sclsecDC_SCALED_SEC 型変数
[in]factor加算する倍精度実数値
Returns
DC_SCALED_SEC と倍精度実数の和

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 )

DC_SCALED_SEC と整数の加算

Parameters
[in]sclsecDC_SCALED_SEC 型変数
[in]factor加算する整数値
Returns
DC_SCALED_SEC と整数の和

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 )

DC_SCALED_SEC と単精度実数の加算

Parameters
[in]sclsecDC_SCALED_SEC 型変数
[in]factor加算する実数値
Returns
DC_SCALED_SEC と実数の和

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 )

2つの DC_SCALED_SEC 型変数の加算

Parameters
[in]sclsec11番目の DC_SCALED_SEC 型変数
[in]sclsec22番目の DC_SCALED_SEC 型変数
Returns
2つの DC_SCALED_SEC 型変数の和

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
メッセージの出力

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