Project 14: Desirable language features for numerical programming Oxford 1975: ============ Special session on programming languages summarised in the minutes, pp 6-7 and 13. SESSION ON PROGRAMMING LANGUAGES, 4.00 PM, JANUARY 14 Position Paper: The Use of FORTRAN for a Subroutine Library - What's Wrong Now but Could be Corrected in a New Standard - J Reid Dr Reid presented a criticism of the existing and proposed new FORTRAN standards based upon his experience with the Harwell Library. He described eight deficiencies in the existing language - (i) The allocation of workspace. In the absence of dynamic allocation, which would be most satisfactory, dynamic equivalence was proposed. (ii) Entry points are a convenience not allowed by the current ANSI standards. (iii) It ought to be possible to preserve the values of variables, which are currently lost, between entries to a SUBROUTINE or FUNCTION, by using a SAVE command. (iv) The arithmetic should meet well-defined standards. (v) There is a need for COMPLEX DOUBLE PRECISION. (vi) There is a need for half integers, (i.e. integers stored compactly to only half the usual precision). (vii) Parameters omitted from a subroutine cal l (but retaining the parameter separators) might be given default values. (viii) Implied DO-loops in, DATA statements are highly desirable for large array initialisation. Discussion: Each of these points attracted comments as the talk proceeded. At the end Dr Ford observed that Algol 68 met most of these requirements, although with some cost in efficiency. Position Paper: Outline of Possible WG 2.5 Activities in a FORTRAN Language Survey - C W Gear In the paper, which Professor Fosdick presented in the absence of Professor Gear, a series of stages were outlined for the collection of information on FORTRAN implementations. These were described under the headings 'Syntactic', 'Semantic', 'Program Speed', 'Compiler Bugs', 'Desirable Extensions' and 'Program Verifiers'. Discussion: Since the topic had been raised several times, Dr Pool asked whether anyone would be strongly opposed to the Working Group placing an emphasis on software. There was no reply. FIRST SESSION, 9,00 AM, 16 JANUARY At Dr Pool's suggestion languages other than FORTRAN were discussed. Professor Dekker mentioned the portability difficulties of Algol 60 and expressed his liking for Algol 68. Dr Ford drew the Group's attention to the subset of Algol 68, devised and implemented at Liverpool University by Dr P Hibbert. Professor Dekker agreed to study this on behalf of the Group. Dr Reinsch expressed some reservations about subsets and mentioned the less restrictive compiler written at Munich. Harwell 1980: ============= J.R. Rice. Language facilities for numerical computation: principles and preferences ------------------------------------------------------------------------- Rice explained the purpose of his report (IFIP/WG 2.5 (Harwell-7)707) and summarized some of its contents. Discussion Duff: Is this to be the basis for the design of a new language? Rice: I hope it will be a menu of facilities for anyone designing any new language. The designer would choose from this menu knowing the value of the facilities for numerical computation; the choices would be part of the design process. Price: How many features should a language contain explicitly? Should the language itself not be sparse but powerful enough to build these things in conveniently? Delves: A new language should be extensible so that the numerical community can add features. Ford: Too much flexibility in Algol 68 has led to libraries not being portable from one compiler to another. S.G. van der Meulen. Abstract data types for numerical applications and some thoughts on precision ----------------------------------------------------------------------------- Van der Meulen explained how abstract data types in the Torrix system permit software to be written only once and yet applied in a wide variety of algebraic systems. He also commented on its implementation in Algol 68. Discussion Curtis: I wonder about the execution efficiency of your system. In general this demands that the actual operations are implemented directly in corresponding machine code when it is available. Van der Meulen: Future hardware is likely to permit execution of micro-code without loss of efficiency. Wichmann: On present computers you must use procedure calls or put the operations in line thereby losing the separate compilation facility. Wichmann: How do you handle constants, e.g. 10.1? Van der Meulen; Yes, there are difficulties here. One solution is to require all constants to be input as literals. Boulder 1981: ============= Rice announced that he and Hull were continuing to work on a joint document to supercede IFIP/WG 2.5 (Boulder-13) 813. Brown said that he would like the intrinsic functions to be available as machine hardware instructions. Soederkoeping 1983: =================== Language Numerics ----------------- Hull first summarized the current state of his project on language facilities for scientific computation. The CADAC arithmetic unit (for variable precision decimal arithmetic) was completed in the fall of 1982, and can now be accessed through C subroutines on an 11/34. It will be moved to a VAX and used by the Numerical Turing compiler, hopefully before Christmas 1983. (Numerical Turing is an extension of Turing, and is designed to provide the facilities described at the Boulder Conference.) The design of a CADAC chip has been started. Hull then presented three specific proposals : (1) exception handling facilities, (2) specification of elementary functions, (3) minimal specifications for an arithmetic unit. There was very little, if any, support for (1), although there seemed to be a general feeling that something ought to be done to help X3J3 develop useful facilities for "event handling" in numerical computation. Proposals (2) and (3) appeared to be more acceptable. A group consisting of Hull, Battiste, Ford (Du Croz), Stetter agreed to work more specifically on (3). Hull agreed to send a draft to all WG members, before the next group meeting. Pasadena 1984: ============== Conference at JPL, Tuesday June 26 Prof. Hull: The design and implementation of special language features for numerical computation. ------------------------------------------------------------- Outline of special features: 1) Decimal, normalized, p-digit floating-point numbers with exponent range [-10p, 10 p]. Arithmetic operations return properly rounded results, or exceptions. So do operations such as truncated quotient remainder, and setexp functions. Directed roundings also available. 2) Precision of variables and precision of operations declared separately. Either can be changed dynamically. 3) Exception handlers (for overflow, underflow, indeterminate, zerodivide and fail) are of two kinds. One kind can be associated with individual arithmetic or function operators that might raise exceptions. Another for all such operators within a scope. In either case, user has prescribed freedom to specify action to be taken if exception is raised, including the substitution of a value to replace the exception before resuming the calculations at the point where the exception arises. The exception handling facilities have so for not been completely implemented. Otherwise all of the special facilities are available in Numerical Turing, which runs on a VAX with software support or, on one particular VAX, with the support of a specially designed hardware arithmetic unit called CADAC. Programs to illustrate the use of these facilities are presented, including programs for dot product, euclidean norm, square root, and matrix decomposition, all working in whatever the environment precision in which they are invoked, and all using still higher precision at intermediate stages when necessary. A program for solving linear systems to within an accuracy prescribed by the user, and another for solving quadratic equations are also presented. Plans are underway to provide implementations on IBM and National Semiconductor machines. These are intended to be more efficient, and to provide access to Fortran Libraries as well. Argonne 1986: ============= Floating-point Validation ------------------------- Ford reported that there had been some tidying up of the software and documentation of FPV since the last meeting of the WG, and that further experience of running FPV on other machines had been gained. A thorough analysis of floating point arithmetic on the Cray 1, Cyber 205 and CDC 7600 was completed, finding errors in double precision arithmetic on all three machines. Cray have corrected the errors, CDC have promised corrections. Ford further said that they had also explored the many anomalies in arithmetic on these machines (especially in double arithmetic). A prototype program to test floating point base conversion had been prepared, and was undergoing testing. The package was being marketed, and sold.