forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Search found 1928 matches
forums.silverfrost.com Forum Index
Author Message
  Topic: Different results for 32-Bit and 64-Bit versions
mecej4

Replies: 14
Views: 11246

PostForum: Support   Posted: Fri Dec 05, 2025 6:12 pm   Subject:
The NSWC Fortran subroutine library contains the routine CGAMMA, which appears to be quite suitable as a replacement for your GAMCAR:

https://wp.csiro.au/alanmiller/NSWC/cgamma.f90
  Topic: Latest FTN95 does not accept * as format repetition count
mecej4

Replies: 4
Views: 174

PostForum: Support   Posted: Fri Dec 05, 2025 9:56 am   Subject:
Thanks, Paul. The use of '*' as a repeat count for format items was introduced in F2008. There is a description of the feature at https://stevelionel.com/drfortran/2009/07/01/doctor-fortran-in-revert- ...
  Topic: Latest FTN95 does not accept * as format repetition count
mecej4

Replies: 4
Views: 174

PostForum: Support   Posted: Fri Dec 05, 2025 4:09 am   Subject: Latest FTN95 does not accept * as format repetition count
Given the following program:

program testg0
implicit none
character(*), parameter :: cfmt = '(*(g0,1x))'
integer :: i,j,k
i=2; j=3; k=i*j
print cfmt,i,j ...
  Topic: Kudos to Silverfrost
mecej4

Replies: 0
Views: 848

PostForum: General   Posted: Thu Nov 20, 2025 2:00 pm   Subject: Kudos to Silverfrost
The following short program came out of a discussion at Fortran.Discourse.Group. When run, it reproduces the result from the 1966 paper by Lander and Parkin in 1966, which disproved the long-standing ...
  Topic: shiftr and shiftl
mecej4

Replies: 6
Views: 33034

PostForum: Suggestions   Posted: Tue Nov 18, 2025 7:09 pm   Subject:
Thanks, Paul. Updating to the latest DLLs fixed the problem.
  Topic: Please add new intrinsic functions that use x64 LEADZ,TRAILZ
mecej4

Replies: 6
Views: 1687

PostForum: Suggestions   Posted: Sun Nov 16, 2025 3:34 pm   Subject:
Thanks, Kenneth, and I have no excuse for not being aware of those additions to F2008 in 2025, other than not running into an instance of one of them being beneficial in a Fortran program.
  Topic: shiftr and shiftl
mecej4

Replies: 6
Views: 33034

PostForum: Suggestions   Posted: Sun Nov 16, 2025 12:29 pm   Subject: Missing entry point JSHIFTL#
Paul, I took Bill's source code and removed the lines for the module, leaving me a small source file, with invocations of SHIFTR and SHIFTL, which should be available in the current version of FTN95. ...
  Topic: shiftr and shiftl
mecej4

Replies: 6
Views: 33034

PostForum: Suggestions   Posted: Sun Nov 16, 2025 12:12 pm   Subject: new intrinsics SHIFTL and SHIFTR
Paul, the new intrinsics SHIFTL and SHIFTR in Version 9.10 work with /x64, but fail in 32-bit EXEs. The problem is not present in Version 9.14


program tst
implicit none
print *,shiftr& ...
  Topic: Please add new intrinsic functions that use x64 LEADZ,TRAILZ
mecej4

Replies: 6
Views: 1687

PostForum: Suggestions   Posted: Sun Nov 16, 2025 11:52 am   Subject: Suport for TRAILZ in other compilers
Gfortran, Intel Fortran, Absoft Fortran and NAG Fortran provide TRAILZ as an intrinsic function.

Another application for TRAILZ is in rapid calculation of Collatz sequences. I am curious to know i ...
  Topic: Please add new intrinsic functions that use x64 LEADZ,TRAILZ
mecej4

Replies: 6
Views: 1687

PostForum: Suggestions   Posted: Fri Nov 14, 2025 2:57 pm   Subject:
Thanks, Paul.
The trailz function is also useful in deciding whether a four digit year is a leap year.

integer:: yyyy, ntz
logical :: cent, leap

ntz = trailz(yyy ...
  Topic: Please add new intrinsic functions that use x64 LEADZ,TRAILZ
mecej4

Replies: 6
Views: 1687

PostForum: Suggestions   Posted: Thu Nov 13, 2025 3:26 pm   Subject: Please add new intrinsic functions that use x64 LEADZ,TRAILZ
Paul, please consider adding new intrinsic functions that make the X64 instructions LEADZ, TRAILZ and POPCNT available to the Fortran programmer. There are several situations where such a function cal ...
  Topic: code to calculate weekday for a given date
mecej4

Replies: 20
Views: 8581

PostForum: General   Posted: Thu Nov 06, 2025 2:14 pm   Subject:
Applying the DOW function to dates from decades ago can be beset by many problems. For instance, consider the Alaska problem:

the purchase date of Friday, October 6 (Julian) was followed once agai ...
  Topic: code to calculate weekday for a given date
mecej4

Replies: 20
Views: 8581

PostForum: General   Posted: Fri Oct 31, 2025 1:56 pm   Subject:
See https://www.nottingham.ac.uk/manuscriptsandspecialcollections/researchguidance/datingdocuments/juliangregorian.aspx

where you can even see an image of part of the orders and text with a partial ...
  Topic: code to calculate weekday for a given date
mecej4

Replies: 20
Views: 8581

PostForum: General   Posted: Thu Oct 30, 2025 11:24 pm   Subject:
We could also use the MODULO() intrinsic function instead of MOD():
dow = modulo(v,7)+1

This may not suit users of Fortran 77.
I, too, have found myself making errors with code involving signed ...
  Topic: code to calculate weekday for a given date
mecej4

Replies: 20
Views: 8581

PostForum: General   Posted: Thu Oct 30, 2025 2:50 pm   Subject:
Here is a little puzzle that can be solved using a DOW() function.

Find years in the range 1901 to 2099 for which:

(i) the weekdays of January 1 and December 31 are the same, and
(ii) Decembe ...
 
Page 1 of 129 Goto page 1, 2, 3 ... 127, 128, 129  Next
All times are GMT + 1 Hour
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group