# ALTRAN

ALTRAN (ALgebraic TRANslator) is a FORTRAN extension providing rational algebra[definition needed], developed by W.S. Brown, at Bell Labs around 1968. ALTRAN, a FORTRAN version of ALPAK.[1] "can be thought of as a variant of FORTRAN with the addition of an extra declaration, the 'algebraic' type declaration."[2] ALPAK, written in 1964, originally consisted of a set of subroutines for FORTRAN written in assembly language. These subroutines were themselves rewritten in FORTRAN for ALTRAN.[3]

Although ALTRAN is written in ANSI FORTRAN, nevertheless there exist differences in FORTRAN implementations. ALTRAN handles machine dependencies through the use of a macro preprocessor called M.[4] In 1979, ALTRAN was ported to the Control Data Corporation 6600 and Cyber 176 computers at the Air Force Weapons Laboratory. They found that "ALTRAN is about 15 times faster than FORMAC…, and it is at least 12 times faster than REDUCE."[5]

ALTRAN should not be confused with the ALGOL to FORTRAN Translator, called Altran, that "converts Extended Algol programs into Fortran IV."[6]

## Sample program

```     PROCEDURE MAIN # SIMPLE EXAMPLE OF USE OF FTNOUT
LONG ALGEBRAIC (X:10,Y:10) F
ALTRAN FTNOUT
OPTS(201,72) # FTNOUT REQUIRES A LINE LENGTH OF 72
F = EXPAND( (X+2*Y+1000000)**3 )
WRITE F # PRINT F
WRITE (25) " FUNCTION F(X,Y)"
"C EXAMPLE PROG WRITTEN WITH FTNOUT." ,
F ,
" RETURN"™,       " END"
# WE HAVE WRITTEN A SIMPLE PROGRAM ON UNIT 25, NOW WE INVOKE FTNOUT TO
# THIS ALTRAN OUTPUT TO LEGAL FORTRAN.
FTNOUT
END```

## References

1. ^ Tapley, B.D.; Szebehely, V.G. (2012). Recent Advances in Dynamical Astronomy. Springer Science & Business Media. p. 364. ISBN 978-94-010-2611-6. Retrieved Sep 3, 2019.
2. ^ Geddes, Keith O.; Czapor, Stephen R.; Labahn, George (2007). Algorithms for Computer Algebra. Springer Science & Business Media. p. 4. ISBN 0-7923-9259-0. Retrieved Sep 3, 2019.
3. ^ Lamagna, Edmund A. (2019). Computer Algebra: Concepts and Techniques. CRC Press. p. 12. ISBN 9781138093140. Retrieved Sep 3, 2019.
4. ^ Brown, P.J. (ed.) (1977). Software Portability. Cambridge University Press. p. 21. ISBN 0-521-29725-7. Retrieved Sep 3, 2019.CS1 maint: extra text: authors list (link)
5. ^ Rhoades, Jr., Cecil E. "AFWL Implementation of ALTRAN" (PDF). dtic.mil. Retrieved Sep 3, 2019.
6. ^ Wilner, Wayne T. "ALGOL TO FORTRAN TRANSLATOR" (PDF). slac.stanford.edu. Retrieved Sep 3, 2019.
• W.S. Brown, "A language and system for symbolic algebra on a digital computer", SYMSAC '66 Proceedings of the first ACM symposium on Symbolic and algebraic manipulation, p. 501- 540, January 1966.
• W.S. Brown, ALTRAN User's Manual (2nd ed.), Bell Laboratories, Murray Hill, N.J., 1972.
• Stuart I. Feldman, "A brief description of Altran", ACM SIGSAM Bulletin, Volume 9 Issue 4, November 1975, p. 12 - 20.
• A.D. Hall and S.C. Johnson, "ALTRAN programs for SIGSAM problem #6", ACM SIGSAM Bulletin, Volume 8 Issue 2, May 1974, p. 12 - 36.
• A.D. Hall, "The ALTRAN System for Rational Function Manipulation — A Survey". Communications of the ACM, 14(8):517–521 (August 1971).
• Mansour Farah, "A FORMAL DESCRIPTION OF ALTRAN USING LINKED FOREST MANIPULATION SYSTEMS", Technical Report CS-73-08, University of Waterloo, April, 1973.