Fortran : fonction inconnue
Résolu/Fermé3 réponses
sam3000
Messages postés
1225
Date d'inscription
mercredi 22 décembre 2004
Statut
Membre
Dernière intervention
13 juin 2005
144
19 mai 2005 à 14:39
19 mai 2005 à 14:39
salut,
Voila ce qui devrais t'aider (si tu comprend l'anglais)
http://www.math.hawaii.edu/lab/197/fortran/fort4.htm
en gros, c'est son role:
sinon je vais te traduire ça ici (tu demance si c'est le cas!)
Voila ce qui devrais t'aider (si tu comprend l'anglais)
http://www.math.hawaii.edu/lab/197/fortran/fort4.htm
en gros, c'est son role:
The function sign in Fortran is called the sign transfer function. It is a function of two variables, and its definition involves two cases: CASE 1: If y ≥ 0 then sign(x,y) = abs(x) , CASE 2: If y < 0 then sign(x,y) = - abs(x)
sinon je vais te traduire ça ici (tu demance si c'est le cas!)
SIGN(parametre1,parametre2)
renvoie parametre1 avec signe du 2ème parametre
exemple:
SIGN(50,-20) renvoie -50 (explication 50x-1)
SIGN(-50,-20) renvoie +50(explication -50x-1)
SIGN(50,20) renvoie 50(explication 50x1)
SIGN(-50,40) renvoie -50(explication -50x1)
attention si tu donnes parametre2=0 ,resultat imprevu(unsafe)
renvoie parametre1 avec signe du 2ème parametre
exemple:
SIGN(50,-20) renvoie -50 (explication 50x-1)
SIGN(-50,-20) renvoie +50(explication -50x-1)
SIGN(50,20) renvoie 50(explication 50x1)
SIGN(-50,40) renvoie -50(explication -50x1)
attention si tu donnes parametre2=0 ,resultat imprevu(unsafe)
19 mai 2005 à 15:24
29 mars 2010 à 15:00
sign(1D0,x), remplacer 1D0 par le type de x selon usage...