
(/VERSIONCHECK 2) 

(DEFUN |FPS-;float;2IS;1| (|ma| |ex| $)
  (SPADCALL |ma| |ex| (SPADCALL (QREFELT $ 8)) (QREFELT $ 10))) 

(DEFUN |FPS-;digits;Pi;2| ($)
  (PROG (#1=#:G1811)
    (RETURN
     (PROG1
         (LETT #1#
               (MAX 1
                    (QUOTIENT2
                     (SPADCALL 4004 (- (SPADCALL (QREFELT $ 13)) 1)
                               (QREFELT $ 14))
                     13301))
               |FPS-;digits;Pi;2|)
       (|check-subtype| (> #1# 0) '(|PositiveInteger|) #1#))))) 

(DEFUN |FPS-;toString;SNniS;3| (|x| |n| $)
  (PROG (|res| |x2| |tenn| |x0| |x1|)
    (RETURN
     (SEQ
      (LETT |x1| (SPADCALL |x| (QREFELT $ 17)) . #1=(|FPS-;toString;SNniS;3|))
      (LETT |x0| (SPADCALL (SPADCALL |x| |x1| (QREFELT $ 18)) (QREFELT $ 19))
            . #1#)
      (LETT |tenn| (SPADCALL 1 |n| 10 (QREFELT $ 10)) . #1#)
      (LETT |x2|
            (SPADCALL (SPADCALL |tenn| |x0| (QREFELT $ 20)) (QREFELT $ 17))
            . #1#)
      (LETT |res|
            (LIST (STRINGIMAGE (SPADCALL |x1| (QREFELT $ 21))) "."
                  (STRINGIMAGE (SPADCALL |x2| (QREFELT $ 21))))
            . #1#)
      (EXIT (SPADCALL (ELT $ 23) |res| (QREFELT $ 26))))))) 

(DEFUN |FloatingPointSystem&| (|#1|)
  (PROG (|pv$| $ |dv$| DV$1)
    (RETURN
     (PROGN
      (LETT DV$1 (|devaluate| |#1|) . #1=(|FloatingPointSystem&|))
      (LETT |dv$| (LIST '|FloatingPointSystem&| DV$1) . #1#)
      (LETT $ (GETREFV 29) . #1#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3
                (LETT |pv$|
                      (|buildPredVector| 0 0
                                         (LIST
                                          (|HasCategory| |#1|
                                                         '(|arbitraryExponent|))
                                          (|HasCategory| |#1|
                                                         '(|arbitraryPrecision|))))
                      . #1#))
      (|stuffDomainSlots| $)
      (QSETREFV $ 6 |#1|)
      (SETF |pv$| (QREFELT $ 3))
      $)))) 

(MAKEPROP '|FloatingPointSystem&| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|PositiveInteger|)
              (0 . |base|) (|Integer|) (4 . |float|) |FPS-;float;2IS;1|
              (11 . |One|) (15 . |bits|) (19 . *) (25 . |max|)
              |FPS-;digits;Pi;2| (29 . |round|) (34 . -) (40 . |abs|) (45 . *)
              (51 . |retract|) (|String|) (56 . |concat|) (|Mapping| 22 22 22)
              (|List| 22) (62 . |reduce|) (|NonNegativeInteger|)
              |FPS-;toString;SNniS;3|)
           '#(|toString| 68 |float| 74 |digits| 80) 'NIL
           (CONS (|makeByteWordVec2| 1 'NIL)
                 (CONS '#()
                       (CONS '#()
                             (|makeByteWordVec2| 28
                                                 '(0 6 7 8 3 6 0 9 9 7 10 0 6 0
                                                   12 0 6 7 13 2 9 0 7 0 14 0 6
                                                   0 15 1 6 0 0 17 2 6 0 0 0 18
                                                   1 6 0 0 19 2 6 0 0 0 20 1 6
                                                   9 0 21 2 22 0 0 0 23 2 25 22
                                                   24 0 26 2 0 22 0 27 28 2 0 0
                                                   9 9 11 0 0 7 16)))))
           '|lookupComplete|)) 
