- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The advantage of this method, is:
You don't have to resort to a higher order arithmetic, and you always get the correct result.
integer(8) function two_int(istart,istop,istep)
integer(8) istart,istop,istep,i1m,i2m,i1d,i2d
i1m=mod(istart,istep)
i1d=istart/istep
i2m=mod(istop,istep)
i2d=istop/istep
two_int=i2d-i1d+(i2m-i1m+istep)/istep
end function
This method also works for 4 byte quantities.
Or any number of bytes.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bill, let's try to keep it down to a dozen threads on this topic, ok? Use https://software.intel.com/en-us/forums/topic/542848

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page