------- Comment #7 from rob1weld at aol dot com 2007-06-04 08:58 ------- >> [EMAIL PROTECTED] >> IEEE 754 does not discuss any of the functions you list above. In fact, >> IEEE 754 places requirements on exactly one function in libm, and that is >> sqrt(), which must be exact in all rounding modes.
I did a search of this document for "sqrt". Adobe reader says the word is not there. DRAFT Standard for Floating-Point Arithmetic P754 - Draft 1.3.0 Modified at 17:15 GMT on February 23, 2007 http://www.validlab.com/754R/drafts/archive/2007-02-23.pdf I realize that is a draft, perhaps there is an ommision. Here is a clip from the document: Introduction ... PURPOSE: This standard provides a discipline for performing floating-point computation that yields results independent of whether the processing is done in hardware, software, or a combination of the two. For operations specified in the normative part of this standard, numerical results and exceptions are uniquely determined by the values of the input data, sequence of operations, and destination formats, all under user control. This standard defines a family of commercially feasible ways for systems to perform binary and decimal floating-point arithmetic. Among the desiderata that guided the formulation of this standard were a)Facilitate movement of existing programs from diverse computers to those that adhere to this standard. b)Enhance the capabilities and safety available to users and programmers who, though not expert in numerical methods, may well be attempting to produce numerically sophisticated programs. However, we recognize that utility and safety are sometimes antagonists. c)Encourage experts to develop and distribute robust and efficient numerical programs that are portable, by way of minor editing and recompilation, onto any computer that conforms to this standard and possesses adequate capacity. When restricted to a declared subset of the standard, these programs should produce identical results on all conforming systems. d)Provide direct support for 1)Execution-time diagnosis of anomalies 2)Smoother handling of exceptions 3)Interval arithmetic at a reasonable cost. e)Provide for development of 1)Standard elementary functions such as exp and cos 2)Very high precision (multiword) arithmetic 3)Coupling of numerical and symbolic algebraic computation. f)Enable rather than preclude further refinements and extensions. 2. References The following referenced documents are indispensable for the application of this standard: ANSI/IEEE Std 7541985 R1990, IEEE Standard for Binary Floating-Point Arithmetic.[1] ISO/IEC 9899, Second edition 1999-12-01, Programming languages C.[2] [1] IEEE publications are available from the Institute of Electrical and Electronics Engineers, 445 Hoes Lane, P.O. Box 1331, Piscataway, NJ 08855-1331, USA. [2] ISO publications are available from the ISO Central Secretariat, Case Postale 56, 1 rue de Varembé, CH-1211, Genève 20, Switzerland/Suisse. ISO publications are also available in the United States from the Sales Department, American National Standards Institute, 11 West 42nd Street, 13th Floor, New York, NY 10036, USA. Annex B Expression evaluation B.3 Reproducible results Languages should provide means for programmers to specify reproducible results that are identical on all platforms supporting that language and this standard, for operations completely specified by this standard. Annex D Elementary transcendental functions All the directives in this annex are optional. ... Functions implemented as directed here have the properties that they preserve monotonicity and reproduce results exactly from implementation to implementation. ... Languages should define which functions are required or recommended to be provided in correctly-rounded versions. When a language chooses not to specify a function as conforming to this annex, each implementation should document the available domain, exceptional cases, worst-case accuracies achieved, and indicate whether the accuracies are proven or measured for a subset of inputs. --- Please Note: "Languages should provide means for programmers to specify reproducible results that are identical on all platforms supporting that language and this standard, for operations completely specified by this standard." "When a language chooses not to specify a function as conforming to this annex, each implementation should document the available domain, exceptional cases, worst-case accuracies achieved, and indicate whether the accuracies are proven or measured for a subset of inputs." I understand "should" is defined in the document in section 3.1.4. You said: "IEEE 754 does not discuss any of the functions you list above. In fact, IEEE 754 places requirements on exactly one function in libm, and that is sqrt(), which must be exact in all rounding modes." I say: The language's standard chooses the functions it will support. IE: "BASIC" does not have to support complex numbers (in the old days, maybe today it does). IEEE 754r does not say how to write a compliant BASIC compiler (another standard might). IEEE 754r does say that if you include a function then you should be able to "reproduce results exactly from implementation to implementation". It is fair to say _correct_ results should be identical on any platform. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32180