- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Link kopiert
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
The code violates the Fortran standard. Two consecutive unary operators, - and / are not allowed. This is considered as extension, and the processor (compiler) can do whatever it wants. Possibly ifort decides to first execute the second fraction, giving -0.5, and then 1.0/(-0.5) gives -2.000. ifort -e08 rejects the code, nagfor rejects it always, and also gfortran with -std=f2008 rejects it. Without this, it accepts it as extension giving the desired result, but you should never count on that.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Threads/articles with similar topics:
https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/799570
https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/759702
https://docs.oracle.com/cd/E19957-01/805-4939/6j4m0vncp/index.html
https://groups.google.com/forum/#!topic/comp.lang.fortran/MAOcu3EoCjs

- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite