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

    Truncated-integer-sin/cos-table

    Create a scaled, truncated integer sin/cos table from 0 to 2*\pi.

    This function creates a table of approximations to

    sin[cos]( (2 \pi i)/n ) * scale

    For i = 0,...,n-1. The result is an alist binding i to sin[cos](i).

    Arguments:

    • sin/cos -- :SIN or :COS.
    • n -- Total number of table entries
    • pie -- An approximation to \pi sufficiently accurate for the user's purposes.
    • itr -- Required number of iterations of FAST-COMPUTE-SIN[COS] sufficient for user's accuracy.
    • scale -- Scale factor.

    Definitions and Theorems

    Function: truncated-integer-sin/cos-table

    (defun
        truncated-integer-sin/cos-table
        (sin/cos n pie itr scale)
        (declare
             (xargs :guard (and (or (eq sin/cos :sin) (eq sin/cos :cos))
                                (integerp n)
                                (<= 0 n)
                                (rationalp pie)
                                (integerp itr)
                                (<= 0 itr)
                                (rationalp scale))))
        (truncated-integer-sin/cos-table-fn sin/cos 0 n pie itr scale))