aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/strap/FPS.lsp
blob: f3935aa4289d83e32cc3f372a3d5c7fb607c6cad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
(/VERSIONCHECK 2) 

(DEFPARAMETER |FloatingPointSystem;AL| 'NIL) 

(DEFUN |FloatingPointSystem;| ()
  (PROG (#0=#:G1397)
    (RETURN
      (PROG1 (LETT #0#
                   (|Join| (|RealNumberSystem|)
                           (|mkCategory| '|domain|
                               '(((|float| ($ (|Integer|) (|Integer|)))
                                  T)
                                 ((|float| ($ (|Integer|) (|Integer|)
                                            (|PositiveInteger|)))
                                  T)
                                 ((|order| ((|Integer|) $)) T)
                                 ((|base| ((|PositiveInteger|))) T)
                                 ((|exponent| ((|Integer|) $)) T)
                                 ((|mantissa| ((|Integer|) $)) T)
                                 ((|bits| ((|PositiveInteger|))) T)
                                 ((|digits| ((|PositiveInteger|))) T)
                                 ((|precision| ((|PositiveInteger|)))
                                  T)
                                 ((|bits| ((|PositiveInteger|)
                                           (|PositiveInteger|)))
                                  (|has| $
                                         (ATTRIBUTE
                                          |arbitraryPrecision|)))
                                 ((|digits|
                                      ((|PositiveInteger|)
                                       (|PositiveInteger|)))
                                  (|has| $
                                         (ATTRIBUTE
                                          |arbitraryPrecision|)))
                                 ((|precision|
                                      ((|PositiveInteger|)
                                       (|PositiveInteger|)))
                                  (|has| $
                                         (ATTRIBUTE
                                          |arbitraryPrecision|)))
                                 ((|increasePrecision|
                                      ((|PositiveInteger|) (|Integer|)))
                                  (|has| $
                                         (ATTRIBUTE
                                          |arbitraryPrecision|)))
                                 ((|decreasePrecision|
                                      ((|PositiveInteger|) (|Integer|)))
                                  (|has| $
                                         (ATTRIBUTE
                                          |arbitraryPrecision|)))
                                 ((|min| ($))
                                  (AND (|not|
                                        (|has| $
                                         (ATTRIBUTE
                                          |arbitraryPrecision|)))
                                       (|not|
                                        (|has| $
                                         (ATTRIBUTE
                                          |arbitraryExponent|)))))
                                 ((|max| ($))
                                  (AND (|not|
                                        (|has| $
                                         (ATTRIBUTE
                                          |arbitraryPrecision|)))
                                       (|not|
                                        (|has| $
                                         (ATTRIBUTE
                                          |arbitraryExponent|))))))
                               '((|approximate| T))
                               '((|PositiveInteger|) (|Integer|)) NIL))
                   |FloatingPointSystem|)
        (SETELT #0# 0 '(|FloatingPointSystem|)))))) 

(DEFUN |FloatingPointSystem| ()
  (LET ()
    (COND
      (|FloatingPointSystem;AL|)
      (T (SETQ |FloatingPointSystem;AL| (|FloatingPointSystem;|)))))) 

(SETQ |$CategoryFrame|
      (|put| '|FloatingPointSystem| '|isCategory| T
             (|addModemap| '|FloatingPointSystem|
                 '(|FloatingPointSystem|) '((|Category|)) T
                 '|FloatingPointSystem| |$CategoryFrame|))) 

(MAKEPROP '|FloatingPointSystem| 'NILADIC T)