gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dc_scaledsec::assignment(=) Interface Reference

Public Member Functions

subroutine dcscaledseccreater (sclsec, sec)
 
subroutine dcscaledseccreated (sclsec, sec)
 
subroutine dcscaledseccreatei (sclsec, sec)
 
subroutine dcscaledsectonumr (sec, sclsec)
 
subroutine dcscaledsectonumd (sec, sclsec)
 
subroutine dcscaledsectonumi (sec, sclsec)
 

Detailed Description

Definition at line 135 of file dc_scaledsec.f90.

Member Function/Subroutine Documentation

◆ dcscaledseccreated()

subroutine dc_scaledsec::assignment(=)::dcscaledseccreated ( type(dc_scaled_sec), intent(out)  sclsec,
real(dp), intent(in)  sec 
)

Definition at line 282 of file dc_scaledsec.f90.

283 use dc_message, only: messagenotify
285 use dc_trace, only: beginsub, endsub
286 use dc_types, only: dp, string
287 implicit none
288 type(DC_SCALED_SEC), intent(out):: sclsec
289 real(DP), intent(in):: sec
290
291 real(DP):: work_sec, print_sec
292 integer:: i, cd, move_up, work_sec_scl_nint
293
294 integer :: stat
295 character(STRING) :: cause_c
296 character(*), parameter:: subname = 'dc_scaledsec'
297 continue
298 !call BeginSub(subname, 'sec=<%f>', d = (/ sec /) )
299 stat = dc_noerr
300 cause_c = ''
301
302 cd = 0
303 if ( sec < 0.0_dp ) then
304 sclsec % flag_negative = .true.
305 work_sec = - sec
306 else
307 sclsec % flag_negative = .false.
308 work_sec = sec
309 end if
310
311 if ( work_sec > scale_factor_xx(imax + 1) ) then
312 call messagenotify( 'W', subname, &
313 & 'input number (%f) is too large.', &
314 & d = (/ sec /) )
315 stat = dc_etoolargetime
316 goto 999
317 end if
318
319 sclsec % sec_ary = 0
320 do i = imax, imin, -1
321
322 work_sec_scl_nint = nint( work_sec * scale_factor_xx(-i) )
323 if ( .not. work_sec < scale_factor_xx(i) &
324 & .or. ( i == imin .and. work_sec_scl_nint >= 1 ) ) then
325
326 if ( i < 0 ) then
327 sclsec % sec_ary(i) = work_sec_scl_nint
328 else
329 sclsec % sec_ary(i) = int( work_sec / scale_factor_xx(i) )
330 end if
331 work_sec = work_sec - sclsec % sec_ary(i) * scale_factor_xx(i)
332 cd = cd + count_digit( sclsec % sec_ary(i) )
333 end if
334 if ( cd > 5 ) then
335 if ( .not. abs( work_sec ) < scale_factor_xx(i-1) ) then
336 print_sec = sclsec
337!!$ call MessageNotify( 'W', subname, &
338!!$ & 'input number (%f) is truncated to (%f).', &
339!!$ & d = (/ sec, print_sec /) )
340 end if
341 exit
342 end if
343 end do
344
345 move_up = 0
346 do i = imin, imax
347 sclsec % sec_ary(i) = sclsec % sec_ary(i) + move_up
348 move_up = 0
349 do while ( sclsec % sec_ary(i) >= scale_factor_int )
350 move_up = move_up + 1
351 sclsec % sec_ary(i) = sclsec % sec_ary(i) - scale_factor_int
352 end do
353 end do
354
355999 continue
356 call storeerror(stat, subname, cause_c=cause_c)
357 !call EndSub(subname)
Error handling module.
Definition dc_error.f90:454
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition dc_error.f90:891
integer, parameter, public dc_noerr
Error storage variables
Definition dc_error.f90:468
integer, parameter, public dc_etoolargetime
Definition dc_error.f90:551
Message output module.
Debug tracing module.
Definition dc_trace.f90:150
subroutine, public beginsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca, version)
Definition dc_trace.f90:457
subroutine, public endsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca)
Definition dc_trace.f90:580
Provides kind type parameter values.
Definition dc_types.f90:55
integer, parameter, public dp
Double Precision Real number
Definition dc_types.f90:92
integer, parameter, public string
Character length for string
Definition dc_types.f90:137

References dc_trace::beginsub(), dc_error::dc_etoolargetime, dc_error::dc_noerr, dc_trace::endsub(), dc_error::storeerror(), and dc_types::string.

Here is the call graph for this function:

◆ dcscaledseccreatei()

subroutine dc_scaledsec::assignment(=)::dcscaledseccreatei ( type(dc_scaled_sec), intent(out)  sclsec,
integer, intent(in)  sec 
)

Definition at line 262 of file dc_scaledsec.f90.

263 implicit none
264 type(DC_SCALED_SEC), intent(out):: sclsec
265 integer, intent(in):: sec
266 continue
267 call dcscaledseccreated(sclsec, real( sec, dp ))

◆ dcscaledseccreater()

subroutine dc_scaledsec::assignment(=)::dcscaledseccreater ( type(dc_scaled_sec), intent(out)  sclsec,
real, intent(in)  sec 
)

Definition at line 272 of file dc_scaledsec.f90.

273 implicit none
274 type(DC_SCALED_SEC), intent(out):: sclsec
275 real, intent(in):: sec
276 continue
277 call dcscaledseccreated(sclsec, real( sec, dp ))

◆ dcscaledsectonumd()

subroutine dc_scaledsec::assignment(=)::dcscaledsectonumd ( real(dp), intent(out)  sec,
type(dc_scaled_sec), intent(in)  sclsec 
)

Definition at line 388 of file dc_scaledsec.f90.

389 use dc_types, only: dp
390 implicit none
391 real(DP), intent(out):: sec
392 type(DC_SCALED_SEC), intent(in):: sclsec
393
394 integer:: i
395 continue
396 sec = 0.0_dp
397 do i = imax, imin, -1
398 sec = sec + ( sclsec % sec_ary(i) * scale_factor_xx(i) )
399 end do
400 if ( sclsec % flag_negative ) sec = - sec

◆ dcscaledsectonumi()

subroutine dc_scaledsec::assignment(=)::dcscaledsectonumi ( integer, intent(out)  sec,
type(dc_scaled_sec), intent(in)  sclsec 
)

Definition at line 362 of file dc_scaledsec.f90.

363 use dc_types, only: dp
364 implicit none
365 integer, intent(out):: sec
366 type(DC_SCALED_SEC), intent(in):: sclsec
367 real(DP):: secd
368 continue
369 call dcscaledsectonumd(secd, sclsec)
370 sec = nint( secd )

◆ dcscaledsectonumr()

subroutine dc_scaledsec::assignment(=)::dcscaledsectonumr ( real, intent(out)  sec,
type(dc_scaled_sec), intent(in)  sclsec 
)

Definition at line 375 of file dc_scaledsec.f90.

376 use dc_types, only: dp
377 implicit none
378 real, intent(out):: sec
379 type(DC_SCALED_SEC), intent(in):: sclsec
380 real(DP):: secd
381 continue
382 call dcscaledsectonumd(secd, sclsec)
383 sec = real( secd )

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