1;;; -*-  Mode: Lisp; Package: Maxima; Syntax: Common-Lisp; Base: 10 -*- ;;;;
2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3;;;     The data in this file contains enhancments.                    ;;;;;
4;;;                                                                    ;;;;;
5;;;  Copyright (c) 1984,1987 by William Schelter,University of Texas   ;;;;;
6;;;     All rights reserved                                            ;;;;;
7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
8;;;     (c) Copyright 1981 Massachusetts Institute of Technology         ;;;
9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
10
11(in-package :maxima)
12
13(macsyma-module pois2)
14
15(declare-top (special poisvals poishift poistsm poissiz poists $poisz $pois1))
16
17(defmspec mpois (x) x)
18
19(defun poislim1 (uu n)
20  (declare (ignore uu))
21  (unless  (fixnump n)
22    (merror (intl:gettext "poislim: argument must be an integer; found: ~M") n))
23  (setq poisvals nil)
24  (setq poists (ash 1 n))
25  (dotimes (j 6)
26    (push (expt poists j) poisvals))
27  (setq poissiz n
28	poistsm (expt 2 (1- n))
29	poishift (let ((sum 0))
30		    (dotimes (i 6 sum)
31		      (incf sum (* poistsm (expt poists i)))))
32	$poisz '((mpois simp) nil nil)
33	$pois1 (list '(mpois simp) nil (list poishift 1)))
34  n)
35
36(defun nonperiod (p)
37  (and (null (cadr p))
38       (= (caaddr p) poishift)
39       (null (cddr (caddr p)))))
40
41(poislim1 nil 5)
42