The computable-reals Reference Manual

This is the computable-reals Reference Manual, version 1.1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:49:38 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 computable-reals

Computable real numbers.

Maintainer

Robert Smith <>

Author

Michael Stoll

License

BSD 3-clause

Long Description

Arbitrary-precision, re-computing real-numbers.

Version

1.1.0

Source

computable-reals.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 computable-reals/computable-reals.asd

Source

computable-reals.asd.

Parent Component

computable-reals (system).

ASDF Systems

computable-reals.


3.1.2 computable-reals/package.lisp

Source

computable-reals.asd.

Parent Component

computable-reals (system).

Packages

computable-reals.


3.1.3 computable-reals/constants.lisp

Dependency

package.lisp (file).

Source

computable-reals.asd.

Parent Component

computable-reals (system).

Public Interface

3.1.4 computable-reals/reals.lisp

Dependency

constants.lisp (file).

Source

computable-reals.asd.

Parent Component

computable-reals (system).

Public Interface
Internals

3.1.5 computable-reals/get-approximations.lisp

Dependency

reals.lisp (file).

Source

computable-reals.asd.

Parent Component

computable-reals (system).


4 Packages

Packages are listed by definition order.


4.1 computable-reals

Source

package.lisp.

Nickname

cr

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Special variables

Special Variable: *creal-tolerance*

precision threshold for the comparison of CREALs, denoting the number of binary digits after the decimal point

Package

computable-reals.

Source

reals.lisp.

Special Variable: *print-prec*

number of decimal digits after the decimal point during output of CREALs

Package

computable-reals.

Source

reals.lisp.

Special Variable: +2pi-r+

2*pi as CREAL

Package

computable-reals.

Source

constants.lisp.

Special Variable: +log2-r+

log(2) as CREAL

Package

computable-reals.

Source

constants.lisp.

Special Variable: +pi-r+

pi as CREAL

Package

computable-reals.

Source

constants.lisp.

Special Variable: +pi/2-r+

pi/2 as CREAL

Package

computable-reals.

Source

constants.lisp.

Special Variable: +pi/4-r+

pi/4 as CREAL

Package

computable-reals.

Source

constants.lisp.


5.1.2 Ordinary functions

Function: *r (&rest args)

Multiplication for CREALs

Package

computable-reals.

Source

reals.lisp.

Function: +r (&rest args)

addition of CREALs

Package

computable-reals.

Source

reals.lisp.

Function: -r (x1 &rest args)

subtraction and negation of CREALs

Package

computable-reals.

Source

reals.lisp.

Function: /r (x1 &rest args)

division for CREALs

Package

computable-reals.

Source

reals.lisp.

Function: approx-r (x k)

Computes an approximation of the bits of a given CREAL. Specifically, given an object of type creal X and a non-negative integer K, return an integer A with

|A*2^(-k) - X| <= 2^(-K).

See RATIONAL-APPROX-R to produce a rational approximation of CREAL.

Package

computable-reals.

Source

reals.lisp.

Function: ash-r (x n)

shift function for CREALs

Package

computable-reals.

Source

reals.lisp.

Function: atan-r (x &optional y)

arctangent for CREALs

Package

computable-reals.

Source

reals.lisp.

Function: ceiling-r (x &optional y l)

ceiling for CREALs

Package

computable-reals.

Source

reals.lisp.

Function: cos-r (x)

cosine for CREALs

Package

computable-reals.

Source

reals.lisp.

Function: creal-p (x)

Is X a CREAL?

Package

computable-reals.

Source

reals.lisp.

Function: exp-r (x)

exponential function for CREALs

Package

computable-reals.

Source

reals.lisp.

Function: expt-r (x y)

exponentiation function for CREALs

Package

computable-reals.

Source

reals.lisp.

Function: floor-r (x &optional y l)

floor for CREALs

Package

computable-reals.

Source

reals.lisp.

Function: log-r (x &optional b)

logarithm for CREALs

Package

computable-reals.

Source

reals.lisp.

Function: make-real (comp)

Create a C-REAL from a computation function COMP.

Package

computable-reals.

Source

reals.lisp.

Function: print-r (x k &optional flag stream)

output function for CREALs

Package

computable-reals.

Source

reals.lisp.

Function: rational-approx-r (x k)

Produce a rational approximation of X called R such that

|R - X| < 2^(-K).

Package

computable-reals.

Source

reals.lisp.

Function: rationalize-r (x k)

Produce a rational approximation of X called R such that

|R - X| < 2^(-K),

taking into account the maximum precision specified by K to return the simplest possible such approximation.

Package

computable-reals.

Source

reals.lisp.

Function: raw-approx-r (x)

Returns an approximation for CREALs

Package

computable-reals.

Source

reals.lisp.

Function: round-r (x &optional y l)

round for CREALs

Package

computable-reals.

Source

reals.lisp.

Function: sin-r (x)

sine for CREALs

Package

computable-reals.

Source

reals.lisp.

Function: sqrt-r (x)

square root for CREALs

Package

computable-reals.

Source

reals.lisp.

Function: tan-r (x)

tangent for CREALs

Package

computable-reals.

Source

reals.lisp.

Function: truncate-r (x &optional y l)

truncate for CREALs

Package

computable-reals.

Source

reals.lisp.


5.1.3 Standalone methods

Method: print-object ((object c-real) stream)
Source

reals.lisp.


5.1.4 Types

Type: creal ()

The type of the computable real numbers.

Package

computable-reals.

Source

reals.lisp.


5.2 Internals


5.2.1 Ordinary functions

Function: atan-r0 (x)
Package

computable-reals.

Source

reals.lisp.

Function: atan-r1 (x)
Package

computable-reals.

Source

reals.lisp.

Reader: c-real-compute (instance)
Package

computable-reals.

Source

reals.lisp.

Target Slot

compute.

Function: c-real-p (object)
Package

computable-reals.

Source

reals.lisp.

Reader: c-real-precision (instance)
Writer: (setf c-real-precision) (instance)
Package

computable-reals.

Source

reals.lisp.

Target Slot

precision.

Reader: c-real-value (instance)
Writer: (setf c-real-value) (instance)
Package

computable-reals.

Source

reals.lisp.

Target Slot

value.

Function: cos-r1 (x)
Package

computable-reals.

Source

reals.lisp.

Function: creal-print (x k flag stream)
Package

computable-reals.

Source

reals.lisp.

Function: divide-r (name what x y l)
Package

computable-reals.

Source

reals.lisp.

Function: exp-r1 (x)
Package

computable-reals.

Source

reals.lisp.

Function: expt-r1 (x y)
Package

computable-reals.

Source

reals.lisp.

Function: get-approx (x k)
Package

computable-reals.

Source

reals.lisp.

Function: invert-r (x)
Package

computable-reals.

Source

reals.lisp.

Function: log-r1 (x)
Package

computable-reals.

Source

reals.lisp.

Function: log-r2 (x)
Package

computable-reals.

Source

reals.lisp.

Function: make-c-real (&key value precision compute)
Package

computable-reals.

Source

reals.lisp.

Function: minus-r (x)
Package

computable-reals.

Source

reals.lisp.

Function: print-c-real (x stream d)
Package

computable-reals.

Source

reals.lisp.

Function: rational-sqrt (x)
Package

computable-reals.

Source

reals.lisp.

Function: raw-approx-cr (x)
Package

computable-reals.

Source

reals.lisp.

Function: rest-help-r (x y q)
Package

computable-reals.

Source

reals.lisp.

Function: round-cr (a k)
Package

computable-reals.

Source

reals.lisp.

Function: sin-r1 (x)
Package

computable-reals.

Source

reals.lisp.

Function: tenpower (k)
Package

computable-reals.

Source

reals.lisp.

Function: transf (x)
Package

computable-reals.

Source

reals.lisp.


5.2.2 Structures

Structure: c-real
Package

computable-reals.

Source

reals.lisp.

Direct superclasses

structure-object.

Direct methods

print-object.

Direct slots
Slot: value
Type

integer

Initform

0

Readers

c-real-value.

Writers

(setf c-real-value).

Slot: precision
Type

(integer -1 *)

Initform

-1

Readers

c-real-precision.

Writers

(setf c-real-precision).

Slot: compute
Type

(function ((integer 0 *)) integer)

Readers

c-real-compute.

Writers

This slot is read-only.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (   *   +   -   /  
A   C   D   E   F   G   I   L   M   P   R   S   T  
Index Entry  Section

(
(setf c-real-precision): Private ordinary functions
(setf c-real-value): Private ordinary functions

*
*r: Public ordinary functions

+
+r: Public ordinary functions

-
-r: Public ordinary functions

/
/r: Public ordinary functions

A
approx-r: Public ordinary functions
ash-r: Public ordinary functions
atan-r: Public ordinary functions
atan-r0: Private ordinary functions
atan-r1: Private ordinary functions

C
c-real-compute: Private ordinary functions
c-real-p: Private ordinary functions
c-real-precision: Private ordinary functions
c-real-value: Private ordinary functions
ceiling-r: Public ordinary functions
cos-r: Public ordinary functions
cos-r1: Private ordinary functions
creal-p: Public ordinary functions
creal-print: Private ordinary functions

D
divide-r: Private ordinary functions

E
exp-r: Public ordinary functions
exp-r1: Private ordinary functions
expt-r: Public ordinary functions
expt-r1: Private ordinary functions

F
floor-r: Public ordinary functions
Function, (setf c-real-precision): Private ordinary functions
Function, (setf c-real-value): Private ordinary functions
Function, *r: Public ordinary functions
Function, +r: Public ordinary functions
Function, -r: Public ordinary functions
Function, /r: Public ordinary functions
Function, approx-r: Public ordinary functions
Function, ash-r: Public ordinary functions
Function, atan-r: Public ordinary functions
Function, atan-r0: Private ordinary functions
Function, atan-r1: Private ordinary functions
Function, c-real-compute: Private ordinary functions
Function, c-real-p: Private ordinary functions
Function, c-real-precision: Private ordinary functions
Function, c-real-value: Private ordinary functions
Function, ceiling-r: Public ordinary functions
Function, cos-r: Public ordinary functions
Function, cos-r1: Private ordinary functions
Function, creal-p: Public ordinary functions
Function, creal-print: Private ordinary functions
Function, divide-r: Private ordinary functions
Function, exp-r: Public ordinary functions
Function, exp-r1: Private ordinary functions
Function, expt-r: Public ordinary functions
Function, expt-r1: Private ordinary functions
Function, floor-r: Public ordinary functions
Function, get-approx: Private ordinary functions
Function, invert-r: Private ordinary functions
Function, log-r: Public ordinary functions
Function, log-r1: Private ordinary functions
Function, log-r2: Private ordinary functions
Function, make-c-real: Private ordinary functions
Function, make-real: Public ordinary functions
Function, minus-r: Private ordinary functions
Function, print-c-real: Private ordinary functions
Function, print-r: Public ordinary functions
Function, rational-approx-r: Public ordinary functions
Function, rational-sqrt: Private ordinary functions
Function, rationalize-r: Public ordinary functions
Function, raw-approx-cr: Private ordinary functions
Function, raw-approx-r: Public ordinary functions
Function, rest-help-r: Private ordinary functions
Function, round-cr: Private ordinary functions
Function, round-r: Public ordinary functions
Function, sin-r: Public ordinary functions
Function, sin-r1: Private ordinary functions
Function, sqrt-r: Public ordinary functions
Function, tan-r: Public ordinary functions
Function, tenpower: Private ordinary functions
Function, transf: Private ordinary functions
Function, truncate-r: Public ordinary functions

G
get-approx: Private ordinary functions

I
invert-r: Private ordinary functions

L
log-r: Public ordinary functions
log-r1: Private ordinary functions
log-r2: Private ordinary functions

M
make-c-real: Private ordinary functions
make-real: Public ordinary functions
Method, print-object: Public standalone methods
minus-r: Private ordinary functions

P
print-c-real: Private ordinary functions
print-object: Public standalone methods
print-r: Public ordinary functions

R
rational-approx-r: Public ordinary functions
rational-sqrt: Private ordinary functions
rationalize-r: Public ordinary functions
raw-approx-cr: Private ordinary functions
raw-approx-r: Public ordinary functions
rest-help-r: Private ordinary functions
round-cr: Private ordinary functions
round-r: Public ordinary functions

S
sin-r: Public ordinary functions
sin-r1: Private ordinary functions
sqrt-r: Public ordinary functions

T
tan-r: Public ordinary functions
tenpower: Private ordinary functions
transf: Private ordinary functions
truncate-r: Public ordinary functions