Re: Arrondi sur les flottants
Laurent GUERBY <[email protected]>
| Newsgroups | gmane.comp.lang.ada.france |
|---|---|
| Message-ID | <[email protected]> |
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 _______________________________________________ Site WWW de l'association Ada-France: http://www.ada-france.org/ [email protected] http://www.ada-france.org/mailman/listinfo/ada-france