1
0
mirror of https://github.com/PDP-10/its.git synced 2026-03-25 09:52:18 +00:00
Files
PDP-10.its/src/transl/transf.11
Eric Swenson 85994ed770 Added files to support building and running Macsyma.
Resolves #284.

Commented out uses of time-origin in maxtul; mcldmp (init) until we
can figure out why it gives arithmetic overflows under the emulators.

Updated the expect script statements in build_macsyma_portion to not
attempt to match expected strings, but simply sleep for some time
since in some cases the matching appears not to work.
2018-03-11 13:10:19 -07:00

74 lines
2.3 KiB
Common Lisp
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
;;; -*- Mode: Lisp; Package: Macsyma -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; (c) Copyright 1980 Massachusetts Institute of Technology ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; TRANSLATION PROPERTIES FOR MACSYMA OPERATORS AND FUNCTIONS.
;;; This file is for list and array manipulation optimizations.
(macsyma-module transf)
(TRANSL-MODULE TRANSF)
;;; some floating point translations. with tricks.
(DEF%TR %LOG (FORM)
(LET (ARG)
(SETQ ARG (TRANSLATE (CADR FORM)))
(COND ((AND (EQ (CAR ARG) '$FLOAT) (GET (CAAR FORM) 'LISP-FUNCTION-TO-USE))
`($FLOAT ,(GET (CAAR FORM) 'LISP-FUNCTION-TO-USE) ,(CDR ARG)))
(T `($ANY SIMPLIFY (LIST ',(LIST (CAAR FORM)) ,(CDR ARG)))))))
(DEF-SAME%TR %SIN %LOG)
(DEF-SAME%TR %COS %LOG)
(DEF-SAME%TR %TAN %LOG)
(DEF-SAME%TR %COT %LOG)
(DEF-SAME%TR %CSC %LOG)
(DEF-SAME%TR %SEC %LOG)
(DEF-SAME%TR %ACOT %LOG)
(DEF-SAME%TR %SINH %LOG)
(DEF-SAME%TR %COSH %LOG)
(DEF-SAME%TR %TANH %LOG)
(DEF-SAME%TR %COTH %LOG)
(DEF-SAME%TR %CSCH %LOG)
(DEF-SAME%TR %SECH %LOG)
(DEF-SAME%TR %ASINH %LOG)
(DEF-SAME%TR %ACSCH %LOG)
(DEF-SAME%TR %ERF %LOG)
(comment not used
; defsubr1 is also obsolete. see DEF-PROCEDURE-PROPERTY.
(DEFsubr1 TRANSLATE-$NUMBER (FORM)
(LET (ARG)
(SETQ ARG (TRANSLATE (CADR FORM)))
(IF (AND (COVERS '$NUMBER (CAR ARG)) (GET (CAAR FORM) 'LISP-FUNCTION-TO-USE))
(LIST (CAR ARG) (GET (CAAR FORM) 'LISP-FUNCTION-TO-USE) (CDR ARG))
(CONS (CAR ARG) `(SIMPLIFY (LIST ',(LIST (CAAR FORM)) ,(CDR ARG))))))))
(DEFMVAR $TR_FLOAT_CAN_BRANCH_COMPLEX T
"States wether the arc functions might return complex
results. The arc functions are SQRT,LOG,ACOS, etc.
e.g. When it is TRUE then ACOS(X) will be of mode ANY even if X is
of mode FLOAT. When FALSE then ACOS(X) will be of mode FLOAT
if and only if X is of mode FLOAT.")
(def%TR %ACOS (form)
(LET ((arg (translate (cadr form))))
(cond ((and (eq (car arg) '$float)
(get (caar form) 'lisp-function-to-use))
`(,(cond ($TR_FLOAT_CAN_BRANCH_COMPLEX
'$ANY)
(T '$FLOAT))
. (,(GET (CAAR FORM) 'LISP-FUNCTION-TO-USE)
,(CDR ARG))))
(T
`($ANY . (SIMPLIFY (LIST '(,(CAAR FORM)) ,(CDR ARG))))))))
(DEF-SAME%TR %ASIN %ACOS)
(DEF-SAME%TR %ASEC %ACOS)
(DEF-SAME%TR %ASEC %ACOS)
(DEF-SAME%TR %ACSC %ACOS)