- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
How can one assign NaN or some non-number.
var=NULL() does not seem to work.
The idea is to signal the caller that of a function that an invalid call was made and to recover gracefully.
Yes , I have not yet studied cvf's ability to throw proper exceptions.
tnx in adv.
Tim
var=NULL() does not seem to work.
The idea is to signal the caller that of a function that an invalid call was made and to recover gracefully.
Yes , I have not yet studied cvf's ability to throw proper exceptions.
tnx in adv.
Tim
Link kopiert
2 Antworten
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
One method I have used successfully in the past is to write the NAN bit pattern
into an integer variable and then use TRANSFER() to move this pattern into a
floating-point variable. E.g.
INTEGER*4 I
INTEGER*8 J
REAL*4 X
REAL*8 Y
I = Z'FFFFFFFF'
J = Z'FFFFFFFFFFFFFFFF'
X = TRANSFER(I)
Y = TRANSFER(J)
The bit pattern with all 1s is just one of the many available NaN bit patterns. By
using different NaNs, you could track where in a computation the uninitialized
data occured.
-- Norbert
into an integer variable and then use TRANSFER() to move this pattern into a
floating-point variable. E.g.
INTEGER*4 I
INTEGER*8 J
REAL*4 X
REAL*8 Y
I = Z'FFFFFFFF'
J = Z'FFFFFFFFFFFFFFFF'
X = TRANSFER(I)
Y = TRANSFER(J)
The bit pattern with all 1s is just one of the many available NaN bit patterns. By
using different NaNs, you could track where in a computation the uninitialized
data occured.
-- Norbert
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Norb,
Thank much,
I also tot of dis:
negOne=-1.
x=sqrt(negOne)
Tim
Thank much,
I also tot of dis:
negOne=-1.
x=sqrt(negOne)
Tim

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