• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Recursion-and-induction
      • Hons-and-memoization
      • Events
      • Parallelism
      • History
      • Programming
      • Operational-semantics
      • Real
      • Start-here
      • Debugging
      • Miscellaneous
        • Term
        • Ld
        • Hints
        • Type-set
        • Ordinals
        • Clause
        • ACL2-customization
        • With-prover-step-limit
        • Set-prover-step-limit
        • With-prover-time-limit
        • Local-incompatibility
        • Set-case-split-limitations
        • Subversive-recursions
        • Specious-simplification
        • Defsum
        • Gcl
        • Oracle-timelimit
        • Thm
        • Defopener
        • Case-split-limitations
        • Set-gc-strategy
        • Default-defun-mode
        • Top-level
        • Reader
          • Sharp-f-reader
          • Fancy-string-reader
          • Sharp-u-reader
          • Sharp-dot-reader
          • Sharp-d-reader
            • Backquote
            • Sharp-bang-reader
          • Ttags-seen
          • Adviser
          • Ttree
          • Abort-soft
          • Defsums
          • Gc$
          • With-timeout
          • Coi-debug::fail
          • Expander
          • Gc-strategy
          • Coi-debug::assert
          • Sin-cos
          • Def::doc
          • Syntax
          • Subversive-inductions
        • Output-controls
        • Macros
        • Interfacing-tools
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Reader
    • Numbers

    Sharp-d-reader

    Read a rational number as a representable rational (see df)

    When the ACL2 reader encounters the two-character sequence #d, it invokes the Lisp reader to obtain the next token, which should designate a Lisp double-precision floating-point number. (Technically, the Lisp value of variable *read-default-float-format* is the symbol DOUBLE-FLOAT when the floating-point token is read.) The reader then returns the rational number represented by that floating-point token.

    The discussion above is complete, but it may make more sense to those familiar with so-called df values in ACL2. See df.

    See also sharp-f-reader, which reads input starting with #f. As with #d, one reads floating-point notation and returns the corresponding rational number. However, while #d reads the next token as a Lisp floating-point number, #f is specific to ACL2 and follows precise documented rules that, unlike #d, allow use of underscores (_) and hexadecimal notation.