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_sub_s (sclsec)
type(dc_scaled_sec) function dcscaledsec_sub_ss (sclsec1, sclsec2)
type(dc_scaled_sec) function dcscaledsec_sub_si (sclsec, factor)
type(dc_scaled_sec) function dcscaledsec_sub_is (factor, sclsec)
type(dc_scaled_sec) function dcscaledsec_sub_sr (sclsec, factor)
type(dc_scaled_sec) function dcscaledsec_sub_rs (factor, sclsec)
type(dc_scaled_sec) function dcscaledsec_sub_sd (sclsec, factor)
type(dc_scaled_sec) function dcscaledsec_sub_ds (factor, sclsec)

Detailed Description

Definition at line 193 of file dc_scaledsec.f90.

Member Function/Subroutine Documentation

◆ dcscaledsec_sub_ds()

type(dc_scaled_sec) function dc_scaledsec::operator(-)::dcscaledsec_sub_ds ( real(dp), intent(in) factor,
type(dc_scaled_sec), intent(in) sclsec )

倍精度実数から DC_SCALED_SEC を減算

Parameters
[in]factor倍精度実数値
[in]sclsec減算する DC_SCALED_SEC 型変数
Returns
倍精度実数と DC_SCALED_SEC の差

Definition at line 1573 of file dc_scaledsec.f90.

1574 implicit none
1575 real(DP), intent(in):: factor
1576 type(DC_SCALED_SEC), intent(in):: sclsec
1577 type(DC_SCALED_SEC):: factor_scl
1578 continue
1579 factor_scl = factor
1580 result = factor_scl - sclsec

◆ dcscaledsec_sub_is()

type(dc_scaled_sec) function dc_scaledsec::operator(-)::dcscaledsec_sub_is ( integer, intent(in) factor,
type(dc_scaled_sec), intent(in) sclsec )

整数から DC_SCALED_SEC を減算

Parameters
[in]factor整数値
[in]sclsec減算する DC_SCALED_SEC 型変数
Returns
整数と DC_SCALED_SEC の差

Definition at line 1473 of file dc_scaledsec.f90.

1474 implicit none
1475 integer, intent(in):: factor
1476 type(DC_SCALED_SEC), intent(in):: sclsec
1477 type(DC_SCALED_SEC):: factor_scl
1478 continue
1479 factor_scl = factor
1480 result = factor_scl - sclsec

◆ dcscaledsec_sub_rs()

type(dc_scaled_sec) function dc_scaledsec::operator(-)::dcscaledsec_sub_rs ( real, intent(in) factor,
type(dc_scaled_sec), intent(in) sclsec )

単精度実数から DC_SCALED_SEC を減算

Parameters
[in]factor実数値
[in]sclsec減算する DC_SCALED_SEC 型変数
Returns
実数と DC_SCALED_SEC の差

Definition at line 1523 of file dc_scaledsec.f90.

1524 implicit none
1525 real, intent(in):: factor
1526 type(DC_SCALED_SEC), intent(in):: sclsec
1527 type(DC_SCALED_SEC):: factor_scl
1528 continue
1529 factor_scl = factor
1530 result = factor_scl - sclsec

◆ dcscaledsec_sub_s()

type(dc_scaled_sec) function dc_scaledsec::operator(-)::dcscaledsec_sub_s ( type(dc_scaled_sec), intent(in) sclsec)

DC_SCALED_SEC の符号反転 (単項マイナス)

Parameters
[in]sclsecDC_SCALED_SEC 型変数
Returns
符号を逆にした DC_SCALED_SEC 型変数

Definition at line 1338 of file dc_scaledsec.f90.

1339 implicit none
1340 type(DC_SCALED_SEC), intent(in):: sclsec
1341 continue
1342 result % flag_negative = .not. sclsec % flag_negative
1343 result % sec_ary = sclsec % sec_ary

◆ dcscaledsec_sub_sd()

type(dc_scaled_sec) function dc_scaledsec::operator(-)::dcscaledsec_sub_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 1548 of file dc_scaledsec.f90.

1549 implicit none
1550 type(DC_SCALED_SEC), intent(in):: sclsec
1551 real(DP), intent(in):: factor
1552 type(DC_SCALED_SEC):: factor_scl
1553 continue
1554 factor_scl = factor
1555 result = sclsec - factor_scl

◆ dcscaledsec_sub_si()

type(dc_scaled_sec) function dc_scaledsec::operator(-)::dcscaledsec_sub_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 1448 of file dc_scaledsec.f90.

1449 implicit none
1450 type(DC_SCALED_SEC), intent(in):: sclsec
1451 integer, intent(in):: factor
1452 type(DC_SCALED_SEC):: factor_scl
1453 continue
1454 factor_scl = factor
1455 result = sclsec - factor_scl

◆ dcscaledsec_sub_sr()

type(dc_scaled_sec) function dc_scaledsec::operator(-)::dcscaledsec_sub_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 1498 of file dc_scaledsec.f90.

1499 implicit none
1500 type(DC_SCALED_SEC), intent(in):: sclsec
1501 real, intent(in):: factor
1502 type(DC_SCALED_SEC):: factor_scl
1503 continue
1504 factor_scl = factor
1505 result = sclsec - factor_scl

◆ dcscaledsec_sub_ss()

type(dc_scaled_sec) function dc_scaledsec::operator(-)::dcscaledsec_sub_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 1361 of file dc_scaledsec.f90.

1362 implicit none
1363 type(DC_SCALED_SEC), intent(in):: sclsec1, sclsec2
1364
1365 integer:: i, move_down
1366 logical:: both_negative, sclsec2_flag_negative
1367 type(DC_SCALED_SEC):: sclsec1_opsign, sclsec2_opsign
1368 type(DC_SCALED_SEC):: sclsec1_nosign, sclsec2_nosign
1369 type(DC_SCALED_SEC):: large, small
1370 continue
1371 both_negative = .false.
1372
1373 ! 負の値の処理
1374 ! Handle negative value
1375 !
1376 sclsec2_flag_negative = sclsec2 % flag_negative
1377 if ( sclsec1 % flag_negative ) then
1378 both_negative = .true.
1379 sclsec2_flag_negative = .not. sclsec2_flag_negative
1380 end if
1381 if ( sclsec2_flag_negative ) then
1382 sclsec1_opsign = sclsec1
1383 sclsec1_opsign % flag_negative = .false.
1384 sclsec2_opsign = sclsec2
1385 sclsec2_opsign % flag_negative = .false.
1386
1387 result = sclsec1_opsign + sclsec2_opsign
1388 if ( both_negative ) then
1389 result % flag_negative = .not. result % flag_negative
1390 end if
1391 return
1392 end if
1393
1394 ! 絶対値の比較
1395 ! Compare absolute values
1396 !
1397 sclsec1_nosign = sclsec1
1398 sclsec1_nosign % flag_negative = .false.
1399 sclsec2_nosign = sclsec2
1400 sclsec2_nosign % flag_negative = .false.
1401
1402 if ( sclsec1_nosign > sclsec2_nosign ) then
1403 result % flag_negative = .false.
1404 large = sclsec1_nosign
1405 small = sclsec2_nosign
1406 elseif ( sclsec1_nosign < sclsec2_nosign ) then
1407 result % flag_negative = .true.
1408 large = sclsec2_nosign
1409 small = sclsec1_nosign
1410 else
1411 result = 0
1412 return
1413 end if
1414
1415 move_down = 0
1416 do i = imin, imax
1417 result % sec_ary(i) = large % sec_ary(i) - small % sec_ary(i) + move_down
1418 if ( result % sec_ary(i) < 0 ) then
1419 move_down = ( result % sec_ary(i) / scale_factor_int ) - 1
1420 result % sec_ary(i) = &
1421 & mod( result % sec_ary(i), scale_factor_int ) + scale_factor_int
1422 else
1423 move_down = 0
1424 end if
1425 end do
1426
1427 if ( both_negative ) then
1428 result % flag_negative = .not. result % flag_negative
1429 end if
1430

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