View previous topic :: View next topic |
Author |
Message |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2426 Location: Yateley, Hants, UK
|
Posted: Sat Oct 11, 2025 12:58 pm Post subject: |
|
|
Sid,
To complement Paul's answer, you can also use the OPTIONS compiler directive to set the default REAL to be DOUBLE PRECISION or REAL*8, and something similar to make all INTEGERs 4 byte:
OPTIONS (INTL, DREAL)
Although REAL*4 is good enough precision in many cases, there are also many cases where it isn't. The option DREAL makes it appear as though the computer only has REAL*8 - unless you declare something specifically to a lower precision.
Eddie |
|
Back to top |
|
 |
IanLambley
Joined: 17 Dec 2006 Posts: 511 Location: Sunderland
|
Posted: Thu Oct 16, 2025 9:57 pm Post subject: |
|
|
Is the extended precision going to be available in FTN95? It seems to have been added in the 2008 "iso_fortran_env". |
|
Back to top |
|
 |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2426 Location: Yateley, Hants, UK
|
Posted: Thu Oct 16, 2025 10:46 pm Post subject: |
|
|
Ian,
By 'extended precision' do you mean REAL*10 ? I remember Paul saying that it's there in 32 bit, but not in 64 bit FTN95.
Eddie |
|
Back to top |
|
 |
IanLambley
Joined: 17 Dec 2006 Posts: 511 Location: Sunderland
|
Posted: Thu Oct 16, 2025 11:59 pm Post subject: |
|
|
Eddie,
You are correct, there is a Real*10 option available in 32-bit as the intel 8086 co-processor supported this resolution directly. It was not ported to the 64-bit version. I was really talking about the Real*16 data type that we had in VAX Fortran-77 all those years ago. In that there was the option to compile with the "Grand" and "Huge" precision allowing either a very high precision but a lower range than the other option which allowed for larger values but with a lower precision. Obviously, they were for sending spacecraft to the moon and further. They also had uses in transfer matrix type of vibration analysis where the determinant of the final matrix involved subtracting the multiple of two large numbers from the multiple of two other large numbers and adjusting a frequency so that they would result in a zero value, thus identifying a natural frequency. This is something our company used for the analysis of the whirling of ship's propeller shafts.
I had just hoped that it would appear in FTN95, although it appears that it is only in the later Fortran standards. |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8278 Location: Salford, UK
|
Posted: Fri Oct 17, 2025 9:06 am Post subject: |
|
|
We are currently working towards implementing extended precision for the x64 platform but it seems unlikely that this will be finished in time for the next full release.
Initially it could be real*10 with real*16 coming later.
The extension may require the use of third party redistributables that would need to be downloaded by the user. |
|
Back to top |
|
 |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2426 Location: Yateley, Hants, UK
|
Posted: Fri Oct 17, 2025 10:53 am Post subject: |
|
|
I was just getting my camera ready to take some photos at a formal dinner tonight, and I chose a 128Gb microSD card. Your mention of VAX takes me back. If I go further back to my days of using an Elliot/NCR 4120 or an ICL 1900 series machine, both with 32k words of memory, and respectively tapes or an 8Mb disk, then I�m back in the days of it being impossible to use DOUBLE PRECISION for all but a few named variables. It was worse with the 16k IBM 1130.The concept of a megabyte was alien, and a Gigabyte unimaginable. The idea that storage on the microSD card scale would be achievable � ever � was a pipedream.
At least the word length on the 4120 and 1900 series machines was 24 bits, so 2-word standard REAL was effectively REAL*6. I remember being told by Zienkiewicz (who I met at couple of times at the Institution of Civil Engineers in London) that in the early days of the numerically-integrated isoparametric finite elements, some Americans thought his results were fake as they couldn�t reproduce them using (effectively) REAL*4. At Swansea Zienkiewicz�s people were running stuff on another ICL 1900 machine.
Things ran brilliantly on the London Uni CDC machines with their 60-bit words. REAL*8 is even better. I sometimes wonder about REAL*10 or more, and what sort of calculations demand those precisions. |
|
Back to top |
|
 |
IanLambley
Joined: 17 Dec 2006 Posts: 511 Location: Sunderland
|
Posted: Fri Oct 17, 2025 1:15 pm Post subject: |
|
|
Ah yes, the olden-golden days of ICL 1900s, Maximop and George 3. That is what I used at Sunderland Poly. When the computer was shown to us when I started there in 1973, the operator turned up the volume control on the teletype console so we could hear the data and address bus. Seemingly they used it to tell whether a job was stuck in a loop! They also had an Elliot 803a.
Times have changed.
I used Real*10 for the "Whirling of Shafts" program on a PC, in the absence of Real*16. It actually worked but the program is now effectively scrapped as it is not available in the new FTN95-X64.
As an aside, here is the chorus of a television program signature tune:
Oh what happened to you?
Whatever happened to me?
What became of the people we used to be?
Tomorrow's almost over, today went by so fast
It's the only thing to look forward to, the past
I'm sure you can guess the program.
I have a couple of MicroVax which I'm trying to give to a museum along with my 1980 Acorn Atom!!
Regards
Ian |
|
Back to top |
|
 |
mecej4
Joined: 31 Oct 2006 Posts: 1906
|
Posted: Fri Oct 17, 2025 5:38 pm Post subject: |
|
|
Quote: |
At least the word length on the 4120 and 1900 series machines was 24 bits... |
There were some old mainframes with 36 and 48-bit words, too, on which 6-bit characters were standard. Running Fortran programs from those on a modern system will have to contend with the fact that a REAL*4 or a REAL*8 variable does not match an integer number of characters. |
|
Back to top |
|
 |
mecej4
Joined: 31 Oct 2006 Posts: 1906
|
Posted: Fri Oct 17, 2025 5:48 pm Post subject: |
|
|
Quote: |
there is a Real*10 option available in 32-bit as the intel 8086 co-processor supported this resolution directly |
The 80-bit float type was useful in the early days of X86/87 computing, but its use today has many drawbacks. The x87 used a floating point stack, and there were no instructions to transfer data between the FPU registers and the CPU registers. One had to first do a transfer to memory, and then transfer from memory to the target register. In doing this, it is a problem that there are no instructions to transfer ten bytes. Having to detect and process exceptions is an additional source of trouble. In summary, it may be best to forget about using REAL*10 in new code. |
|
Back to top |
|
 |
mecej4
Joined: 31 Oct 2006 Posts: 1906
|
Posted: Fri Oct 17, 2025 5:55 pm Post subject: |
|
|
Quote: |
I have a couple of MicroVax |
In the VAX era, we might have written "MicroVaxen" - cute? |
|
Back to top |
|
 |
|