RE: Arrondi sur les flottants
"FARAIL, Patrick" <[email protected]>
| Newsgroups | gmane.comp.lang.ada.france |
|---|---|
| Message-ID | <8323421F60F77B4FADD4D9076B1C5D12E17602@FR0-MAILMB19.res.airbus.corp> |
Cela répond en partie à ma question : l'autre partie concerne l'arrondi des nombres réels non constants (issus de calcul). Merci encore de votre réponse si rapide Patrick FARAIL Software Engineering Methods Avionics & Simulation Products - EYYWI AIRBUS France Phone : 33 (0)5 61 93 66 28 Fax : 33 (0)5 61 93 03 54 Mailto : [email protected] -----Message d'origine----- De : Laurent GUERBY [mailto:[email protected]] Envoyé : jeudi 3 novembre 2005 10:51 À : FARAIL, Patrick Cc : [email protected] Objet : Re: [ada-france] Arrondi sur les flottants En Ada 95, l'arrondi des constantes reelles est deterministe, 4.9(38) : 38 For a real static expression that is not part of a larger static expression, and whose expected type is not a descendant of a formal scalar type, the implementation shall round or truncate the value (according to the Machine_Rounds attribute of the expected type) to the nearest machine number of the expected type; if the value is exactly half-way between two machine numbers, any rounding shall be performed away from zero. If the expected type is a descendant of a formal scalar type, no special rounding or truncating is required - normal accuracy rules apply (see Annex G). Mais ce n'est peut-etre pas l'objet votre question. Laurent On Thu, 2005-11-03 at 10:24 +0100, FARAIL, Patrick wrote: > Bonjour à tous, > une petite question pour des spécialistes de l'implémentation des > flottants et du GNAT. Nous utilisons le compilateur GNAT sur machine > Sun/Solaris et nous nous posons la question suivante : > si un flottant est compris entre deux nombres représentables en > machine comment le compilateur gère l'arrondi, au plus bas au plus > haut. Est-ce configurable comme cela est le cas en C et si oui comment > par un attribut du langage, une option de compilation ou autre ? > > Merci de votre aide > Patrick FARAIL > Software Engineering Methods > Avionics & Simulation Products - EYYWI > AIRBUS France > Phone : 33 (0)5 61 93 66 28 > Fax : 33 (0)5 61 93 03 54 > Mailto :[email protected] > > > > This e-mail is intended only for the above addressee. It may contain > privileged information. If you are not the addressee you must not > copy, > distribute, disclose or use any of the information in it. If you have > received it in error please delete it and immediately notify the > sender. > Security Notice: all e-mail, sent to or from this address, may be > accessed by someone other than the recipient, for system management > and > security reasons. This access is controlled under Regulation of > Investigatory Powers Act 2000, Lawful Business Practises. > > _______________________________________________ > Site WWW de l'association Ada-France: http://www.ada-france.org/ > [email protected] > http://www.ada-france.org/mailman/listinfo/ada-france This mail has originated outside your organization, either from an external partner or the Global Internet. Keep this in mind if you answer this message. This e-mail is intended only for the above addressee. It may contain privileged information. If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. If you have received it in error please delete it and immediately notify the sender. Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises. _______________________________________________ Site WWW de l'association Ada-France: http://www.ada-france.org/ [email protected] http://www.ada-france.org/mailman/listinfo/ada-france