34 public::
operator(==),
operator(>),
operator(<),
operator(>=),
operator(<=)
35 public::
operator(+),
operator(-),
operator(*),
operator(/),
mod,
modulo 42 integer,
parameter::
imin = -2
43 integer,
parameter::
imax = 8
47 & 1.0e-24_DP, 1.0e-21_DP, 1.0e-18_DP, 1.0e-15_DP, &
48 & 1.0e-12_DP, 1.0e-9_DP, 1.0e-6_DP, 1.0e-3_DP, &
50 & 1.0e+3_DP, 1.0e+6_DP, 1.0e+9_DP, 1.0e+12_DP, &
51 & 1.0e+15_DP, 1.0e+18_DP, 1.0e+21_DP, 1.0e+24_DP, &
56 & (/ 1, 1000, 1000000, 1000000000 /)
68 logical:: flag_negative = .false.
69 logical:: dummy = .false.
72 interface assignment(=)
86 interface operator(==)
102 interface operator(<)
108 interface operator(>=)
114 interface operator(<=)
120 interface operator(+)
130 interface operator(-)
141 interface operator(*)
151 interface operator(/)
202 integer,
intent(in):: sec
212 real,
intent(in):: sec
226 real(DP),
intent(in):: sec
228 real(DP):: work_sec, print_sec
229 integer:: i, cd, move_up, work_sec_scl_nint
232 character(STRING) :: cause_c
233 character(*),
parameter:: subname =
'dc_scaledsec' 240 if ( sec < 0.0_dp )
then 241 sclsec % flag_negative = .true.
244 sclsec % flag_negative = .false.
250 &
'input number (%f) is too large.', &
261 & .or. ( i ==
imin .and. work_sec_scl_nint >= 1 ) )
then 264 sclsec % sec_ary(i) = work_sec_scl_nint
284 sclsec % sec_ary(i) = sclsec % sec_ary(i) + move_up
287 move_up = move_up + 1
293 call storeerror(stat, subname, cause_c=cause_c)
302 integer,
intent(out):: sec
315 real,
intent(out):: sec
328 real(DP),
intent(out):: sec
337 if ( sclsec % flag_negative ) sec = - sec
357 integer,
intent(in),
optional :: unit
363 character(*),
intent(in),
optional:: indent
368 integer :: out_unit, sec_ary_rev(
imin:
imax)
370 character(STRING):: indent_str
372 character(*),
parameter:: subname =
'DCScaledSecPutLine' 376 if (
present(unit))
then 384 if (
present(indent) )
then 385 if ( len(indent) /= 0 )
then 386 indent_len = len(indent)
387 indent_str(1:indent_len) = indent
392 if ( sclsec % flag_negative )
then 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 404 & indent_str(1:indent_len) // &
405 &
'#<DC_SCALED_SEC:: @sign=%c @yotta=%d @zetta=%d @exa=%d @peta=%d @tera=%d', &
408 & indent_str(1:indent_len) // &
409 &
' @giga=%d @mega=%d @kilo=%d @base=%d @milli=%d @micro=%d>', &
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 )
434 if ( sclsec1 % flag_negative .and. .not. sclsec2 % flag_negative )
then 438 elseif ( .not. sclsec1 % flag_negative .and. sclsec2 % flag_negative )
then 444 if ( .not. sclsec1 % sec_ary(i) == sclsec2 % sec_ary(i) )
then 458 integer,
intent(in):: sec
462 if ( sclsec % flag_negative .and. .not. sec < 0 )
then 465 elseif ( .not. sclsec % flag_negative .and. sec < 0 )
then 472 result = sclsec == sclsec2
474 if ( .not. all( sclsec % sec_ary(
imin:-1) == (/0, 0/) ) &
475 & .or. .not. all( sclsec % sec_ary(3:
imax) == (/0, 0, 0, 0, 0, 0/) ) )
then 479 sec1 = sclsec % sec_ary(0)
491 integer,
intent(in):: sec
494 result = sclsec == sec
502 real,
intent(in):: sec
506 result = sclsec == sclsec2
513 real,
intent(in):: sec
518 result = sclsec == sclsec2
526 real(DP),
intent(in):: sec
530 result = sclsec == sclsec2
537 real(DP),
intent(in):: sec
542 result = sclsec == sclsec2
557 logical:: both_negative, flag_equal
562 if ( sclsec1 % flag_negative .and. .not. sclsec2 % flag_negative )
then 565 elseif ( .not. sclsec1 % flag_negative .and. sclsec2 % flag_negative )
then 568 elseif ( sclsec1 % flag_negative .and. sclsec2 % flag_negative )
then 569 both_negative = .true.
571 both_negative = .false.
575 if ( sclsec1 % sec_ary(i) > sclsec2 % sec_ary(i) )
then 579 elseif ( sclsec1 % sec_ary(i) < sclsec2 % sec_ary(i) )
then 586 if ( .not. flag_equal .and. both_negative ) result = .not. result
600 integer,
intent(in):: factor
602 integer:: i, sec1, factor_abs
603 logical:: both_negative
605 if ( sclsec % flag_negative .and. .not. factor < 0 )
then 608 elseif ( .not. sclsec % flag_negative .and. factor < 0 )
then 611 elseif ( sclsec % flag_negative .and. factor < 0 )
then 612 both_negative = .true.
614 both_negative = .false.
617 factor_abs =
abs(factor)
621 result = sclsec > factor_scl
624 if ( .not. all( sclsec % sec_ary(3:
imax) == (/0, 0, 0, 0, 0, 0/) ) )
then 627 sec1 = sclsec % sec_ary(0)
631 if ( sec1 == factor_abs )
then 632 result = .not. all( sclsec % sec_ary(
imin:-1) == (/0, 0/) )
634 result = sec1 > factor_abs
638 if ( both_negative ) result = .not. result
652 integer,
intent(in):: factor
655 integer:: i, sec1, factor_abs
656 logical:: both_negative
658 if ( sclsec % flag_negative .and. .not. factor < 0 )
then 661 elseif ( .not. sclsec % flag_negative .and. factor < 0 )
then 664 elseif ( sclsec % flag_negative .and. factor < 0 )
then 665 both_negative = .true.
667 both_negative = .false.
670 factor_abs =
abs(factor)
674 result = factor_scl > sclsec
677 if ( .not. all( sclsec % sec_ary(3:
imax) == (/0, 0, 0, 0, 0, 0/) ) )
then 680 sec1 = sclsec % sec_ary(0)
684 if ( sec1 == factor_abs )
then 687 result = factor_abs > sec1
691 if ( both_negative ) result = .not. result
706 logical:: both_negative, flag_equal
711 if ( sclsec1 % flag_negative .and. .not. sclsec2 % flag_negative )
then 714 elseif ( .not. sclsec1 % flag_negative .and. sclsec2 % flag_negative )
then 717 elseif ( sclsec1 % flag_negative .and. sclsec2 % flag_negative )
then 718 both_negative = .true.
720 both_negative = .false.
724 if ( sclsec1 % sec_ary(i) > sclsec2 % sec_ary(i) )
then 728 elseif ( sclsec1 % sec_ary(i) < sclsec2 % sec_ary(i) )
then 735 if ( .not. flag_equal .and. both_negative ) result = .not. result
749 integer,
intent(in):: factor
751 integer:: i, sec1, factor_abs
752 logical:: both_negative
754 if ( sclsec % flag_negative .and. .not. factor < 0 )
then 757 elseif ( .not. sclsec % flag_negative .and. factor < 0 )
then 760 elseif ( sclsec % flag_negative .and. factor < 0 )
then 761 both_negative = .true.
763 both_negative = .false.
766 factor_abs =
abs(factor)
770 result = sclsec < factor_scl
773 if ( .not. all( sclsec % sec_ary(3:
imax) == (/0, 0, 0, 0, 0, 0/) ) )
then 776 sec1 = sclsec % sec_ary(0)
780 if ( sec1 == factor_abs )
then 783 result = sec1 < factor_abs
787 if ( both_negative ) result = .not. result
800 integer,
intent(in):: factor
803 integer:: i, sec1, factor_abs
804 logical:: both_negative
806 if ( sclsec % flag_negative .and. .not. factor < 0 )
then 809 elseif ( .not. sclsec % flag_negative .and. factor < 0 )
then 812 elseif ( sclsec % flag_negative .and. factor < 0 )
then 813 both_negative = .true.
815 both_negative = .false.
818 factor_abs =
abs(factor)
822 result = factor_scl < sclsec
825 if ( .not. all( sclsec % sec_ary(3:
imax) == (/0, 0, 0, 0, 0, 0/) ) )
then 828 sec1 = sclsec % sec_ary(0)
832 if ( sec1 == factor_abs )
then 833 result = .not. all( sclsec % sec_ary(
imin:-1) == (/0, 0/) )
835 result = factor_abs < sec1
839 if ( both_negative ) result = .not. result
855 result = .not. sclsec1 < sclsec2
868 integer,
intent(in):: factor
870 result = .not. sclsec < factor
882 integer,
intent(in):: factor
885 result = .not. factor < sclsec
899 result = .not. sclsec1 > sclsec2
912 integer,
intent(in):: factor
914 result = .not. sclsec > factor
926 integer,
intent(in):: factor
929 result = .not. factor > sclsec
934 type(
dc_scaled_sec) function dcscaledsec_add_ss(sclsec1, sclsec2) result(result)
945 logical:: both_negative, sclsec2_flag_negative
949 both_negative = .false.
954 sclsec2_flag_negative = sclsec2 % flag_negative
955 if ( sclsec1 % flag_negative )
then 956 both_negative = .true.
957 sclsec2_flag_negative = .not. sclsec2_flag_negative
959 if ( sclsec2_flag_negative )
then 960 sclsec1_opsign = sclsec1
961 sclsec1_opsign % flag_negative = .false.
962 sclsec2_opsign = sclsec2
963 sclsec2_opsign % flag_negative = .false.
964 result = sclsec1_opsign - sclsec2_opsign
965 if ( both_negative )
then 966 result % flag_negative = .not. result % flag_negative
975 result % sec_ary(i) = sclsec1 % sec_ary(i) + sclsec2 % sec_ary(i) + move_up
977 if ( i ==
imax )
then 979 &
'DC_SCALED_SEC must be smaller than 10^24' )
988 if ( both_negative )
then 989 result % flag_negative = .true.
991 result % flag_negative = .false.
998 type(
dc_scaled_sec) function dcscaledsec_add_si(sclsec, factor) result(result)
1006 integer,
intent(in):: factor
1010 result = sclsec + factor_scl
1015 type(
dc_scaled_sec) function dcscaledsec_add_is(factor, sclsec) result(result)
1022 integer,
intent(in):: factor
1027 result = factor_scl + sclsec
1032 type(
dc_scaled_sec) function dcscaledsec_add_sr(sclsec, factor) result(result)
1040 real,
intent(in):: factor
1044 result = sclsec + factor_scl
1049 type(
dc_scaled_sec) function dcscaledsec_add_rs(factor, sclsec) result(result)
1056 real,
intent(in):: factor
1061 result = sclsec + factor_scl
1066 type(
dc_scaled_sec) function dcscaledsec_add_sd(sclsec, factor) result(result)
1074 real(DP),
intent(in):: factor
1078 result = sclsec + factor_scl
1083 type(
dc_scaled_sec) function dcscaledsec_add_ds(factor, sclsec) result(result)
1090 real(DP),
intent(in):: factor
1095 result = sclsec + factor_scl
1100 type(
dc_scaled_sec) function dcscaledsec_sub_s(sclsec) result(result)
1109 result % flag_negative = .not. sclsec % flag_negative
1110 result % sec_ary = sclsec % sec_ary
1115 type(
dc_scaled_sec) function dcscaledsec_sub_ss(sclsec1, sclsec2) result(result)
1124 integer:: i, move_down
1125 logical:: both_negative, sclsec2_flag_negative
1130 both_negative = .false.
1135 sclsec2_flag_negative = sclsec2 % flag_negative
1136 if ( sclsec1 % flag_negative )
then 1137 both_negative = .true.
1138 sclsec2_flag_negative = .not. sclsec2_flag_negative
1140 if ( sclsec2_flag_negative )
then 1141 sclsec1_opsign = sclsec1
1142 sclsec1_opsign % flag_negative = .false.
1143 sclsec2_opsign = sclsec2
1144 sclsec2_opsign % flag_negative = .false.
1146 result = sclsec1_opsign + sclsec2_opsign
1147 if ( both_negative )
then 1148 result % flag_negative = .not. result % flag_negative
1156 sclsec1_nosign = sclsec1
1157 sclsec1_nosign % flag_negative = .false.
1158 sclsec2_nosign = sclsec2
1159 sclsec2_nosign % flag_negative = .false.
1161 if ( sclsec1_nosign > sclsec2_nosign )
then 1162 result % flag_negative = .false.
1163 large = sclsec1_nosign
1164 small = sclsec2_nosign
1165 elseif ( sclsec1_nosign < sclsec2_nosign )
then 1166 result % flag_negative = .true.
1167 large = sclsec2_nosign
1168 small = sclsec1_nosign
1176 result % sec_ary(i) = large % sec_ary(i) - small % sec_ary(i) + move_down
1177 if ( result % sec_ary(i) < 0 )
then 1179 result % sec_ary(i) = &
1186 if ( both_negative )
then 1187 result % flag_negative = .not. result % flag_negative
1194 type(
dc_scaled_sec) function dcscaledsec_sub_si(sclsec, factor) result(result)
1202 integer,
intent(in):: factor
1206 result = sclsec - factor_scl
1211 type(
dc_scaled_sec) function dcscaledsec_sub_is(factor, sclsec) result(result)
1218 integer,
intent(in):: factor
1223 result = factor_scl - sclsec
1228 type(
dc_scaled_sec) function dcscaledsec_sub_sr(sclsec, factor) result(result)
1236 real,
intent(in):: factor
1240 result = sclsec - factor_scl
1245 type(
dc_scaled_sec) function dcscaledsec_sub_rs(factor, sclsec) result(result)
1252 real,
intent(in):: factor
1257 result = factor_scl - sclsec
1262 type(
dc_scaled_sec) function dcscaledsec_sub_sd(sclsec, factor) result(result)
1270 real(DP),
intent(in):: factor
1274 result = sclsec - factor_scl
1279 type(
dc_scaled_sec) function dcscaledsec_sub_ds(factor, sclsec) result(result)
1286 real(DP),
intent(in):: factor
1291 result = factor_scl - sclsec
1296 type(
dc_scaled_sec) function dcscaledsec_mul_ss(sclsec1, sclsec2) result(result)
1307 integer:: i, j, move_up
1310 if ( sclsec1 == zero_sec .or. sclsec2 == zero_sec )
then 1315 if ( sclsec1 % flag_negative )
then 1316 result % flag_negative = .not. sclsec2 % flag_negative
1318 result % flag_negative = sclsec2 % flag_negative
1322 sec_ary_int(:,:) = 0
1325 sec_ary_int(i,j) = &
1326 & sclsec1 % sec_ary(j) * sclsec2 % sec_ary(i) + move_up
1327 if ( i + j >
imax .and. sec_ary_int(i,j) /= 0 )
then 1329 &
'DC_SCALED_SEC must be smaller than 10^24' )
1340 result % sec_ary = 0
1343 if ( i + j <
imin ) cycle
1344 if ( i + j >
imax ) cycle
1345 result % sec_ary(i+j) = result % sec_ary(i+j) + sec_ary_int(i,j)
1351 result % sec_ary(i) = result % sec_ary(i) + move_up
1354 if ( i ==
imax )
then 1356 &
'DC_SCALED_SEC must be smaller than 10^24' )
1359 move_up = move_up + 1
1367 type(
dc_scaled_sec) function dcscaledsec_mul_si(sclsec, factor) result(result)
1379 integer,
intent(in):: factor
1380 integer:: factor_abs
1383 integer:: i, move_up
1385 if ( sclsec == zero_sec .or. factor == 0 )
then 1390 if ( sclsec % flag_negative )
then 1391 result % flag_negative = .not. factor < 0
1393 result % flag_negative = factor < 0
1395 factor_abs =
abs(factor)
1398 sec_ary_dp(:) = 0.0_dp
1400 sec_ary_dp(i) = sclsec % sec_ary(i) * factor_abs + move_up
1410 if ( move_up /= 0 )
then 1412 &
'DC_SCALED_SEC must be smaller than 10^24' )
1421 type(
dc_scaled_sec) function dcscaledsec_mul_is(factor, sclsec) result(result)
1428 integer,
intent(in):: factor
1431 result = sclsec * factor
1436 type(
dc_scaled_sec) function dcscaledsec_mul_sd(sclsec, factor) result(result)
1445 real(DP),
intent(in):: factor
1449 result = sclsec * factor_scl
1454 type(
dc_scaled_sec) function dcscaledsec_mul_ds(factor, sclsec) result(result)
1462 real(DP),
intent(in):: factor
1465 result = sclsec * factor
1470 type(
dc_scaled_sec) function dcscaledsec_mul_sr(sclsec, factor) result(result)
1479 real,
intent(in):: factor
1483 result = sclsec * factor_scl
1488 type(
dc_scaled_sec) function dcscaledsec_mul_rs(factor, sclsec) result(result)
1496 real,
intent(in):: factor
1499 result = sclsec * factor
1504 type(
dc_scaled_sec) function dcscaledsec_div_ss(sclsec, factor) result(result)
1513 real(DP):: factor_abs
1521 if ( .not. all( factor % sec_ary (
imax-4:
imax) == (/ 0, 0, 0, 0, 0 /) ) )
then 1523 &
'factor must be smaller than 10^12' )
1527 result = sclsec / factor_abs
1533 type(
dc_scaled_sec) function dcscaledsec_div_si(sclsec, factor) result(result)
1542 integer,
intent(in):: factor
1544 result = sclsec /
real( factor,
dp )
1549 type(
dc_scaled_sec) function dcscaledsec_div_sd(sclsec, factor) result(result)
1558 real(DP),
intent(in):: factor
1560 real(DP):: factor_abs, move_down, sec_ary_mod(
imin+
imin:
imax)
1563 if ( sclsec % flag_negative )
then 1564 result % flag_negative = .not. factor < 0.0_dp
1566 result % flag_negative = factor < 0.0_dp
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 )
1578 &
mod( ( sclsec % sec_ary(i) + move_down ), factor_abs )
1580 result % sec_ary(i-
imin) =
int( move_down / factor_abs )
1581 sec_ary_mod(i) =
mod( move_down, factor_abs )
1584 if ( sec_ary_mod(i) /= 0.0_dp )
then 1601 type(
dc_scaled_sec) function dcscaledsec_div_sr(sclsec, factor) result(result)
1610 real,
intent(in):: factor
1612 result = sclsec /
real( factor,
dp )
1617 type(
dc_scaled_sec) function dcscaledsec_mod_ss(sclsec, factor) result(result)
1629 integer:: i, move_down_index
1630 real(DP):: move_down
1631 real(DP):: factor_dp
1640 if ( .not. all( factor % sec_ary (
imax-4:
imax) == (/ 0, 0, 0, 0, 0 /) ) )
then 1642 &
'factor must be smaller than 10^12' )
1645 if ( sclsec == factor )
then 1650 factor_scl % sec_ary(
imin:-1) = 0
1652 factor_scl % flag_negative = factor % flag_negative
1654 factor_dp = factor_scl
1659 if ( move_down /= 0.0_dp )
then 1663 if ( i >
imin - 1 )
then 1665 &
mod( ( sclsec % sec_ary(i) + move_down ), factor_dp )
1667 sec_ary_mod(i) =
mod( move_down, factor_dp )
1670 if ( sec_ary_mod(i) /= 0.0_dp )
then 1679 if ( move_down_index >
imin - 1 )
then 1680 result % sec_ary(
imin:move_down_index) = sclsec % sec_ary(
imin:move_down_index)
1683 result % flag_negative = sclsec % flag_negative
1689 type(
dc_scaled_sec) function dcscaledsec_mod_si(sclsec, factor) result(result)
1698 integer,
intent(in):: factor
1703 result =
mod( sclsec, factor_scl )
1708 type(
dc_scaled_sec) function dcscaledsec_mod_sr(sclsec, factor) result(result)
1717 real,
intent(in):: factor
1722 result =
mod( sclsec, factor_scl )
1727 type(
dc_scaled_sec) function dcscaledsec_mod_sd(sclsec, factor) result(result)
1736 real(DP),
intent(in):: factor
1741 result =
mod( sclsec, factor_scl )
1746 type(
dc_scaled_sec) function dcscaledsec_modulo_ss(sclsec, factor) result(result)
1758 integer:: i, move_down_index
1759 real(DP):: move_down
1760 real(DP):: factor_dp
1769 if ( .not. all( factor % sec_ary (
imax-4:
imax) == (/ 0, 0, 0, 0, 0 /) ) )
then 1771 &
'factor must be smaller than 10^12' )
1774 if ( sclsec == factor )
then 1779 factor_scl % sec_ary(
imin:-1) = 0
1781 factor_scl % flag_negative = factor % flag_negative
1783 factor_dp = factor_scl
1788 if ( move_down /= 0.0_dp )
then 1792 if ( i >
imin - 1 )
then 1794 &
mod( ( sclsec % sec_ary(i) + move_down ), factor_dp )
1796 sec_ary_mod(i) =
mod( move_down, factor_dp )
1799 if ( sec_ary_mod(i) /= 0.0_dp )
then 1808 if ( move_down_index >
imin - 1 )
then 1809 result % sec_ary(
imin:move_down_index) = sclsec % sec_ary(
imin:move_down_index)
1812 result % flag_negative = .false.
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
1819 elseif ( sclsec % flag_negative .and. .not. factor % flag_negative )
then 1820 result = factor - result
1821 result % flag_negative = .not. sclsec % flag_negative
1824 result % flag_negative = sclsec % flag_negative
1833 type(
dc_scaled_sec) function dcscaledsec_modulo_si(sclsec, factor) result(result)
1842 integer,
intent(in):: factor
1847 result =
modulo( sclsec, factor_scl )
1852 type(
dc_scaled_sec) function dcscaledsec_modulo_sr(sclsec, factor) result(result)
1861 real,
intent(in):: factor
1866 result =
modulo( sclsec, factor_scl )
1871 type(
dc_scaled_sec) function dcscaledsec_modulo_sd(sclsec, factor) result(result)
1880 real(DP),
intent(in):: factor
1885 result =
modulo( sclsec, factor_scl )
1890 type(
dc_scaled_sec) function dcscaledsec_abs_s(sclsec) result(result)
1901 if ( result % flag_negative ) result % flag_negative = .false.
1906 type(
dc_scaled_sec) function dcscaledsec_int_s(sclsec) result(result)
1918 result % sec_ary(i) = 0
1924 type(
dc_scaled_sec) function dcscaledsec_sign_ss(sclsec1, sclsec2) result(result)
1934 result % flag_negative = sclsec2 % flag_negative
1939 type(
dc_scaled_sec) function dcscaledsec_sign_si(sclsec, factor) result(result)
1947 integer,
intent(in):: factor
1950 sclsec_work = factor
1951 result =
sign( sclsec, sclsec_work )
1956 type(
dc_scaled_sec) function dcscaledsec_sign_sr(sclsec, factor) result(result)
1964 real,
intent(in):: factor
1967 sclsec_work = factor
1968 result =
sign( sclsec, sclsec_work )
1973 type(
dc_scaled_sec) function dcscaledsec_sign_sd(sclsec, factor) result(result)
1981 real(DP),
intent(in):: factor
1984 sclsec_work = factor
1985 result =
sign( sclsec, sclsec_work )
1990 type(
dc_scaled_sec) function dcscaledsec_floor_s(sclsec) result(result)
2000 logical:: flag_after_decimal
2003 flag_after_decimal = .false.
2005 if ( result % sec_ary(i) /= 0 ) flag_after_decimal = .true.
2006 result % sec_ary(i) = 0
2008 if ( flag_after_decimal .and. result % flag_negative )
then 2016 type(
dc_scaled_sec) function dcscaledsec_ceiling_s(sclsec) result(result)
2026 logical:: flag_after_decimal
2029 flag_after_decimal = .false.
2031 if ( result % sec_ary(i) /= 0 ) flag_after_decimal = .true.
2032 result % sec_ary(i) = 0
2034 if ( flag_after_decimal .and. .not. result % flag_negative )
then 2046 integer,
intent(in):: sec
2053 if ( .not. sec < 10**i )
then logical function dcscaledsec_eq_sr(sclsec, sec)
logical function dcscaledsec_ge_ss(sclsec1, sclsec2)
type(dc_scaled_sec) function dcscaledsec_modulo_sr(sclsec, factor)
subroutine dcscaledsectonumr(sec, sclsec)
type(dc_scaled_sec) function dcscaledsec_sign_si(sclsec, factor)
logical function dcscaledsec_gt_si(sclsec, factor)
type(dc_scaled_sec) function dcscaledsec_abs_s(sclsec)
integer function count_digit(sec)
type(dc_scaled_sec) function dcscaledsec_add_rs(factor, sclsec)
type(dc_scaled_sec) function dcscaledsec_mul_sd(sclsec, factor)
type(dc_scaled_sec) function dcscaledsec_ceiling_s(sclsec)
logical function dcscaledsec_gt_ss(sclsec1, sclsec2)
type(dc_scaled_sec) function dcscaledsec_sign_sd(sclsec, factor)
logical function dcscaledsec_lt_ss(sclsec1, sclsec2)
logical function dcscaledsec_le_ss(sclsec1, sclsec2)
type(dc_scaled_sec) function dcscaledsec_sub_rs(factor, sclsec)
real(dp), parameter scale_factor
type(dc_scaled_sec) function dcscaledsec_modulo_si(sclsec, factor)
type(dc_scaled_sec) function dcscaledsec_add_is(factor, sclsec)
subroutine dcscaledsectonumi(sec, sclsec)
type(dc_scaled_sec) function dcscaledsec_sub_sd(sclsec, factor)
type(dc_scaled_sec) function dcscaledsec_add_si(sclsec, factor)
subroutine dcscaledsectonumd(sec, sclsec)
integer, parameter, public dc_etoolargetime
type(dc_scaled_sec) function dcscaledsec_add_ss(sclsec1, sclsec2)
type(dc_scaled_sec) function dcscaledsec_sign_sr(sclsec, factor)
logical function dcscaledsec_gt_is(factor, sclsec)
type(dc_scaled_sec) function dcscaledsec_mod_sr(sclsec, factor)
type(dc_scaled_sec) function dcscaledsec_div_ss(sclsec, factor)
subroutine, public storeerror(number, where, err, cause_c, cause_i)
integer, parameter, public dc_noerr
type(dc_scaled_sec) function dcscaledsec_add_sd(sclsec, factor)
logical function dcscaledsec_eq_sd(sclsec, sec)
integer, dimension(0:3), parameter scale_factor_int_xx
type(dc_scaled_sec) function dcscaledsec_sub_ds(factor, sclsec)
type(dc_scaled_sec) function dcscaledsec_int_s(sclsec)
logical function dcscaledsec_le_si(sclsec, factor)
type(dc_scaled_sec) function dcscaledsec_mod_si(sclsec, factor)
logical function dcscaledsec_le_is(factor, sclsec)
type(dc_scaled_sec) function dcscaledsec_sub_s(sclsec)
subroutine dcscaledseccreater(sclsec, sec)
subroutine dcscaledseccreatei(sclsec, sec)
real(dp), dimension(-(imax+1):imax+1), parameter scale_factor_xx
logical function dcscaledsec_ge_si(sclsec, factor)
integer, parameter, public dp
倍精度実数型変数
type(dc_scaled_sec) function dcscaledsec_div_sr(sclsec, factor)
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
logical function dcscaledsec_eq_ds(sec, sclsec)
type(dc_scaled_sec) function dcscaledsec_mul_rs(factor, sclsec)
type(dc_scaled_sec) function dcscaledsec_div_si(sclsec, factor)
type(dc_scaled_sec) function dcscaledsec_mul_is(factor, sclsec)
type(dc_scaled_sec) function dcscaledsec_add_sr(sclsec, factor)
logical function dcscaledsec_lt_is(factor, sclsec)
type(dc_scaled_sec) function dcscaledsec_mul_ds(factor, sclsec)
logical function dcscaledsec_eq_si(sclsec, sec)
integer, parameter, public stdout
標準出力の装置番号
type(dc_scaled_sec) function dcscaledsec_mod_ss(sclsec, factor)
type(dc_scaled_sec) function dcscaledsec_sign_ss(sclsec1, sclsec2)
logical function dcscaledsec_ge_is(factor, sclsec)
type(dc_scaled_sec) function dcscaledsec_sub_si(sclsec, factor)
type(dc_scaled_sec) function dcscaledsec_modulo_sd(sclsec, factor)
type(dc_scaled_sec) function dcscaledsec_mul_sr(sclsec, factor)
type(dc_scaled_sec) function dcscaledsec_add_ds(factor, sclsec)
type(dc_scaled_sec) function dcscaledsec_floor_s(sclsec)
type(dc_scaled_sec) function dcscaledsec_mul_si(sclsec, factor)
type(dc_scaled_sec) function dcscaledsec_sub_is(factor, sclsec)
logical function dcscaledsec_lt_si(sclsec, factor)
type(dc_scaled_sec) function dcscaledsec_modulo_ss(sclsec, factor)
logical function dcscaledsec_eq_ss(sclsec1, sclsec2)
integer, parameter scale_factor_int
subroutine, public dcscaledsecputline(sclsec, unit, indent)
type(dc_scaled_sec) function dcscaledsec_sub_ss(sclsec1, sclsec2)
logical function dcscaledsec_eq_is(sec, sclsec)
type(dc_scaled_sec) function dcscaledsec_mul_ss(sclsec1, sclsec2)
type(dc_scaled_sec) function dcscaledsec_sub_sr(sclsec, factor)
subroutine dcscaledseccreated(sclsec, sec)
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
type(dc_scaled_sec) function dcscaledsec_div_sd(sclsec, factor)
logical function dcscaledsec_eq_rs(sec, sclsec)
type(dc_scaled_sec) function dcscaledsec_mod_sd(sclsec, factor)
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ