The physical-quantities Reference Manual

This is the physical-quantities Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 06:21:27 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 physical-quantities

A library that provides a numeric type with optional unit and/or uncertainty for computations with automatic error propagation.

Author

Marco Rossini

License

GPLv2

Version

0.1

Dependency

parseq (system).

Source

physical-quantities.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 physical-quantities/physical-quantities.asd

Source

physical-quantities.asd.

Parent Component

physical-quantities (system).

ASDF Systems

physical-quantities.


3.1.2 physical-quantities/package.lisp

Source

physical-quantities.asd.

Parent Component

physical-quantities (system).

Packages

physical-quantities.


3.1.3 physical-quantities/utils.lisp

Dependency

package.lisp (file).

Source

physical-quantities.asd.

Parent Component

physical-quantities (system).

Internals

3.1.4 physical-quantities/conditions.lisp

Dependency

utils.lisp (file).

Source

physical-quantities.asd.

Parent Component

physical-quantities (system).

Public Interface
Internals

3.1.5 physical-quantities/unit-factor.lisp

Dependency

conditions.lisp (file).

Source

physical-quantities.asd.

Parent Component

physical-quantities (system).

Public Interface
Internals

3.1.6 physical-quantities/unit-database.lisp

Dependency

unit-factor.lisp (file).

Source

physical-quantities.asd.

Parent Component

physical-quantities (system).

Public Interface
Internals

3.1.7 physical-quantities/units.lisp

Dependency

unit-database.lisp (file).

Source

physical-quantities.asd.

Parent Component

physical-quantities (system).

Public Interface
Internals

3.1.8 physical-quantities/quantity.lisp

Dependency

units.lisp (file).

Source

physical-quantities.asd.

Parent Component

physical-quantities (system).

Public Interface
Internals

3.1.9 physical-quantities/numeric.lisp

Dependency

quantity.lisp (file).

Source

physical-quantities.asd.

Parent Component

physical-quantities (system).

Public Interface
Internals

3.1.10 physical-quantities/parse-rules.lisp

Dependency

numeric.lisp (file).

Source

physical-quantities.asd.

Parent Component

physical-quantities (system).


3.1.11 physical-quantities/read-macro.lisp

Dependency

parse-rules.lisp (file).

Source

physical-quantities.asd.

Parent Component

physical-quantities (system).

Public Interface

define-read-macros (function).

Internals

3.1.12 physical-quantities/si-units.lisp

Dependency

read-macro.lisp (file).

Source

physical-quantities.asd.

Parent Component

physical-quantities (system).

Public Interface

define-si-units (function).


4 Packages

Packages are listed by definition order.


4.1 physical-quantities

Source

package.lisp.

Nicknames
  • physq
  • pquant
  • pq
Use List
  • common-lisp.
  • parseq.
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 Macros

Macro: define-unit (name &key def alias abbrev prefix-test overwrite)
Package

physical-quantities.

Source

unit-database.lisp.

Macro: define-unit-prefix (name power &key abbrev base)
Package

physical-quantities.

Source

unit-database.lisp.

Macro: defqop (name arg-list &body body)
Package

physical-quantities.

Source

numeric.lisp.

Macro: mkunit (&rest expr)

Human interface to make a unit.

Package

physical-quantities.

Source

units.lisp.

Macro: qop (qform)
Package

physical-quantities.

Source

numeric.lisp.

Macro: quantity (&rest expr)

Function to define quantities without the reader macro.

Package

physical-quantities.

Source

quantity.lisp.

Macro: with-local-units (&body body)

Shadow the global unit table with a new rule table.

Package

physical-quantities.

Source

unit-database.lisp.

Macro: with-saved-units (&body body)

Shadow the global unit table with a copy of the unit table. When returninng from the body the original units are restored.

Package

physical-quantities.

Source

unit-database.lisp.


5.1.2 Ordinary functions

Function: convert-to-base-units (quantity)
Package

physical-quantities.

Source

quantity.lisp.

Function: convert-unit (quantity unit)
Package

physical-quantities.

Source

quantity.lisp.

Function: define-read-macros (&key quantity unit)

Lets the user define the #q(...) and #u(...) read macros.

Package

physical-quantities.

Source

read-macro.lisp.

Function: define-si-units (&key clear-existing-units)
Package

physical-quantities.

Source

si-units.lisp.

Function: make-quantity (&key value error error-type unit)
Package

physical-quantities.

Source

quantity.lisp.

Function: make-unit (&rest unit-factors)

Machine interface for making a unit.

Package

physical-quantities.

Source

units.lisp.

Function: q* (&rest numbers)
Package

physical-quantities.

Source

numeric.lisp.

Function: q+ (&rest numbers)
Package

physical-quantities.

Source

numeric.lisp.

Function: q- (number &rest more-numbers)
Package

physical-quantities.

Source

numeric.lisp.

Function: q/ (number &rest more-numbers)
Package

physical-quantities.

Source

numeric.lisp.

Function: q/= (x y &optional p-value)
Package

physical-quantities.

Source

numeric.lisp.

Function: qabs (number)
Package

physical-quantities.

Source

numeric.lisp.

Function: qacos (number)
Package

physical-quantities.

Source

numeric.lisp.

Function: qacosh (number)
Package

physical-quantities.

Source

numeric.lisp.

Function: qasin (number)
Package

physical-quantities.

Source

numeric.lisp.

Function: qasinh (number)
Package

physical-quantities.

Source

numeric.lisp.

Function: qatan (number)
Package

physical-quantities.

Source

numeric.lisp.

Function: qatanh (number)
Package

physical-quantities.

Source

numeric.lisp.

Function: qcos (number)
Package

physical-quantities.

Source

numeric.lisp.

Function: qcosh (number)
Package

physical-quantities.

Source

numeric.lisp.

Function: qequal (x y)
Package

physical-quantities.

Source

numeric.lisp.

Function: qequalp (x y)
Package

physical-quantities.

Source

numeric.lisp.

Function: qexp (exponent)
Package

physical-quantities.

Source

numeric.lisp.

Function: qexpt (base exponent)
Package

physical-quantities.

Source

numeric.lisp.

Function: qln (number)
Package

physical-quantities.

Source

numeric.lisp.

Function: qlog (number base)
Package

physical-quantities.

Source

numeric.lisp.

Function: qpow (base power)
Package

physical-quantities.

Source

numeric.lisp.

Function: qroot (radicand degree)
Package

physical-quantities.

Source

numeric.lisp.

Function: qround (quantity &key digits place)
Package

physical-quantities.

Source

numeric.lisp.

Function: qsin (number)
Package

physical-quantities.

Source

numeric.lisp.

Function: qsinh (number)
Package

physical-quantities.

Source

numeric.lisp.

Function: qsqrt (quantity)

Computes the square root of a given quantity. Result must always be real.

Package

physical-quantities.

Source

numeric.lisp.

Function: qtan (number)
Package

physical-quantities.

Source

numeric.lisp.

Function: qtanh (number)
Package

physical-quantities.

Source

numeric.lisp.

Function: quantityp (object)
Package

physical-quantities.

Source

quantity.lisp.

Function: str-unit (obj)

Prints the given unit in human readable form

Package

physical-quantities.

Source

units.lisp.

Reader: uf-power (instance)
Writer: (setf uf-power) (instance)
Package

physical-quantities.

Source

unit-factor.lisp.

Target Slot

power.

Reader: uf-unit (instance)
Writer: (setf uf-unit) (instance)
Package

physical-quantities.

Source

unit-factor.lisp.

Target Slot

unit.

Function: unitp (object)

Checks whether an object is a unit.

Package

physical-quantities.

Source

units.lisp.

Function: units-convertible (unit-a unit-b)

Expands and reduces both units and compares the unit factors for equality (in unit and power)

Package

physical-quantities.

Source

units.lisp.

Function: units-equal (unit-a unit-b)

Reduces both units (without converting to base units) and compares the unit factors for equality (in unit and power)

Package

physical-quantities.

Source

units.lisp.

Function: units-equalp (unit-a unit-b)

Reduces both units (converting to base units) and compares the unit factors for equality (in unit and power)

Package

physical-quantities.

Source

units.lisp.


5.1.3 Generic functions

Generic Function: absolute-error (quantity)
Package

physical-quantities.

Source

quantity.lisp.

Methods
Method: absolute-error ((quantity quantity))
Generic Function: (setf absolute-error) (quantity)
Package

physical-quantities.

Source

quantity.lisp.

Methods
Method: (setf absolute-error) ((quantity quantity))
Generic Function: aerr (quantity)
Package

physical-quantities.

Alias for

absolute-error.

Generic Function: (setf aerr) (quantity)
Package

physical-quantities.

Alias for

(setf absolute-error).

Generic Function: q< (x y &optional p-value)

Determines whether the one quantity is less than another quantity

Package

physical-quantities.

Source

numeric.lisp.

Methods
Method: q< ((x quantity) (y quantity) &optional p-value)
Method: q< ((x real) (y quantity) &optional p-value)
Method: q< ((x quantity) (y real) &optional p-value)
Method: q< ((x real) (y real) &optional p-value)
Generic Function: q<= (x y &optional p-value)

Determines whether the one quantity is less or equal to another quantity

Package

physical-quantities.

Source

numeric.lisp.

Methods
Method: q<= ((x quantity) (y quantity) &optional p-value)
Method: q<= ((x real) (y quantity) &optional p-value)
Method: q<= ((x quantity) (y real) &optional p-value)
Method: q<= ((x real) (y real) &optional p-value)
Generic Function: q= (x y &optional p-value)

Determines whether the value of two quantities are equal.

Package

physical-quantities.

Source

numeric.lisp.

Methods
Method: q= ((x quantity) (y quantity) &optional p-value)
Method: q= ((x real) (y quantity) &optional p-value)
Method: q= ((x quantity) (y real) &optional p-value)
Method: q= ((x real) (y real) &optional p-value)
Generic Function: q> (x y &optional p-value)

Determines whether the one quantity is greater than another quantity

Package

physical-quantities.

Source

numeric.lisp.

Methods
Method: q> ((x quantity) (y quantity) &optional p-value)
Method: q> ((x real) (y quantity) &optional p-value)
Method: q> ((x quantity) (y real) &optional p-value)
Method: q> ((x real) (y real) &optional p-value)
Generic Function: q>= (x y &optional p-value)

Determines whether the one quantity is greater or equal to another quantity

Package

physical-quantities.

Source

numeric.lisp.

Methods
Method: q>= ((x quantity) (y quantity) &optional p-value)
Method: q>= ((x real) (y quantity) &optional p-value)
Method: q>= ((x quantity) (y real) &optional p-value)
Method: q>= ((x real) (y real) &optional p-value)
Generic Function: relative-error (quantity)
Package

physical-quantities.

Source

quantity.lisp.

Methods
Method: relative-error ((quantity quantity))
Generic Function: (setf relative-error) (quantity)
Package

physical-quantities.

Source

quantity.lisp.

Methods
Method: (setf relative-error) ((quantity quantity))
Generic Function: rerr (quantity)
Package

physical-quantities.

Alias for

relative-error.

Generic Function: (setf rerr) (quantity)
Package

physical-quantities.

Alias for

(setf relative-error).

Generic Reader: unit (object)
Package

physical-quantities.

Methods
Reader Method: unit ((quantity quantity))

automatically generated reader method

Source

quantity.lisp.

Target Slot

unit.

Generic Writer: (setf unit) (object)
Package

physical-quantities.

Methods
Writer Method: (setf unit) ((quantity quantity))

automatically generated writer method

Source

quantity.lisp.

Target Slot

unit.

Generic Reader: value (object)
Package

physical-quantities.

Methods
Reader Method: value ((quantity quantity))

automatically generated reader method

Source

quantity.lisp.

Target Slot

value.

Generic Writer: (setf value) (object)
Package

physical-quantities.

Methods
Writer Method: (setf value) ((quantity quantity))

automatically generated writer method

Source

quantity.lisp.

Target Slot

value.


5.1.4 Standalone methods

Method: print-object ((obj quantity) stream)
Source

quantity.lisp.


5.1.5 Conditions

Condition: error-propagation-error

Error for situations in which the propagation of uncertainty is undefined

Package

physical-quantities.

Source

conditions.lisp.

Direct superclasses

physical-quantities-error.

Condition: invalid-unit-conversion-error

Error when converting between incompatible units

Package

physical-quantities.

Source

conditions.lisp.

Direct superclasses

invalid-unit-error.

Condition: invalid-unit-error

Generic unit error

Package

physical-quantities.

Source

conditions.lisp.

Direct superclasses

physical-quantities-error.

Direct subclasses
Condition: invalid-unit-operation-error

Error for situations in which the unit is invalid in a given operation

Package

physical-quantities.

Source

conditions.lisp.

Direct superclasses

invalid-unit-error.

Condition: invalid-unit-reference-error

Unit lookup error

Package

physical-quantities.

Source

conditions.lisp.

Direct superclasses

invalid-unit-error.

Condition: operation-undefined-error

Error for situations in which an operation is undefined

Package

physical-quantities.

Source

conditions.lisp.

Direct superclasses

physical-quantities-error.

Condition: physical-quantities-error

Generic error for the physical quantities library.

Package

physical-quantities.

Source

conditions.lisp.

Direct superclasses

simple-error.

Direct subclasses
Condition: unit-definition-conflict-error

Name conflict for the definition of a unit/prefix

Package

physical-quantities.

Source

conditions.lisp.

Direct superclasses

unit-definition-error.

Condition: unit-definition-error

Generic error for unit/prefix definitions.

Package

physical-quantities.

Source

conditions.lisp.

Direct superclasses

physical-quantities-error.

Direct subclasses
Condition: unit-definition-semantic-error

Semantic error in the definition of a unit/prefix

Package

physical-quantities.

Source

conditions.lisp.

Direct superclasses

unit-definition-error.

Condition: unit-definition-syntax-error

Syntax error in the definition of a unit/prefix

Package

physical-quantities.

Source

conditions.lisp.

Direct superclasses

unit-definition-error.


5.1.6 Classes

Class: quantity
Package

physical-quantities.

Source

quantity.lisp.

Direct methods
Direct slots
Slot: value
Initform

0

Initargs

:value

Readers

value.

Writers

(setf value).

Slot: error
Package

common-lisp.

Initform

0

Initargs

:error

Readers

error-direct.

Writers

(setf error-direct).

Slot: unit
Initargs

:unit

Readers

unit.

Writers

(setf unit).


5.2 Internals


5.2.1 Special variables

Special Variable: *unit-abbreviation-table*
Package

physical-quantities.

Source

unit-database.lisp.

Special Variable: *unit-alias-table*
Package

physical-quantities.

Source

unit-database.lisp.

Special Variable: *unit-prefix-table*
Package

physical-quantities.

Source

unit-database.lisp.

Special Variable: *unit-translation-table*
Package

physical-quantities.

Source

unit-database.lisp.


5.2.2 Macros

Macro: dup-quantity (q &key v e u)
Package

physical-quantities.

Source

numeric.lisp.

Macro: error-propagation (&rest var-derivative-pairs)
Package

physical-quantities.

Source

numeric.lisp.

Macro: f-error (type (&rest initargs) control &rest args)

Like (error ...), but allows the condition type to be specified (which is required to inherit from simple-condition).

Package

physical-quantities.

Source

conditions.lisp.

Macro: nand (&rest forms)
Package

physical-quantities.

Source

utils.lisp.

Macro: with-gensyms ((&rest names) &body body)
Package

physical-quantities.

Source

utils.lisp.

Macro: with-unit-lookup ((base-unit translation unit) &body body)
Package

physical-quantities.

Source

unit-database.lisp.


5.2.3 Ordinary functions

Function: ae (val err)
Package

physical-quantities.

Source

quantity.lisp.

Function: beta (x)

Helper for the inverf function.

Package

physical-quantities.

Source

utils.lisp.

Function: chebyshev-polynomial (n x)

Evaluates the nth Chebyshev polynomial.

Package

physical-quantities.

Source

utils.lisp.

Function: chebyshev-polynomial% (n x a b)

Recursion function for the Chebyshev polynomial evaluation.

Package

physical-quantities.

Source

utils.lisp.

Function: clear-units ()
Package

physical-quantities.

Source

unit-database.lisp.

Function: collect-factors (f &rest expanded-unit-factors)
Package

physical-quantities.

Source

units.lisp.

Function: confidence-interval (confidence-value &key two-sided)
Package

physical-quantities.

Source

utils.lisp.

Function: convert-unit% (value unit-a unit-b)

Applies the conversion factor between unit-a and unit-b to the given value.

Package

physical-quantities.

Source

units.lisp.

Function: copy-hash-table (hash-table)

Creates a copy of the given hash table.

Package

physical-quantities.

Source

utils.lisp.

Function: copy-unit (unit)

Creates a copy of the given unit.

Package

physical-quantities.

Source

units.lisp.

Function: copy-unit-factor (instance)
Package

physical-quantities.

Source

unit-factor.lisp.

Function: define-unit% (name &key def aliases abbreviations prefix-test overwrite)

Defines a new unit with the identifier name. A list of aliases and a list of abbreviations are permitted which - when encountered - are internally converted to the primary identifier. The definition allows the unit to be defined in terms of other units, e.g :def (1.602 kilometre). Prefixes is must be a function of two parameters, the base and the power, with which it decides whether a prefix is allowed for the unit. It defaults to allowing all defined prefixes.

Package

physical-quantities.

Source

unit-database.lisp.

Function: define-unit-prefix% (name power &key abbrev base)

Defines a unit prefix such as kilo in kilometre. Apart from the name the power is required (3 for kilo) together with the base that defaults to 10. An abbreviation for the prefix is also allowed which will be used in combination with abbreviated units.

Package

physical-quantities.

Source

unit-database.lisp.

Function: dereference-unit (unit)

Takes a unit and looks up aliases and abbreviations of unit factors and replaces them with the main unit designators.

Package

physical-quantities.

Source

units.lisp.

Function: divide-units (&rest units)

Divides the given units with each, reducing the result.

Package

physical-quantities.

Source

units.lisp.

Function: erf (x)

Calculates the error function.

Package

physical-quantities.

Source

utils.lisp.

Function: errorlessp (quantity)

Checks whether a quantity is without uncertainty/error.

Package

physical-quantities.

Source

quantity.lisp.

Function: expand-unit (unit)

Expands the given unit into base units and reduces them

Package

physical-quantities.

Source

units.lisp.

Function: expand-unit-factor (factor)

Converts a single unit factor into its expansion of base units, together with a conversion factor

Package

physical-quantities.

Source

units.lisp.

Function: has-error-p (quantity)

Checks whether a quantity has uncertainty/error.

Package

physical-quantities.

Source

quantity.lisp.

Function: has-key (key hash-table)
Package

physical-quantities.

Source

utils.lisp.

Function: has-unit-p (quantity)

Checks whether the given quantity has a unit.

Package

physical-quantities.

Source

quantity.lisp.

Function: have (item sequence &key test key)
Package

physical-quantities.

Source

utils.lisp.

Function: inverf (x)

Inverse error function.

Package

physical-quantities.

Source

utils.lisp.

Function: l= (list length)

Tests efficiently whether the length of the list is equal to the given length.

Package

physical-quantities.

Source

utils.lisp.

Function: l> (list length)

Tests efficiently whether the length of the list is greater than the given length.

Package

physical-quantities.

Source

utils.lisp.

Function: ll= (list-a list-b)

Tests efficiently whether the length of list-a is equal to the length of list-b.

Package

physical-quantities.

Source

utils.lisp.

Function: lookup-unit (unit)
Package

physical-quantities.

Source

unit-database.lisp.

Function: make-quantity% (&key value error unit)
Package

physical-quantities.

Source

quantity.lisp.

Function: make-uf (unit power)
Package

physical-quantities.

Source

unit-factor.lisp.

Function: mklist (obj)

Makes a list out of the given object unless it already is a list.

Package

physical-quantities.

Source

utils.lisp.

Function: mkstr (&rest args)
Package

physical-quantities.

Source

utils.lisp.

Function: multiply-units (&rest units)

Multiplies units with each other and reduces the result.

Package

physical-quantities.

Source

units.lisp.

Function: p-value (x)
Package

physical-quantities.

Source

utils.lisp.

Function: power-unit (unit power)

Raises the unit to the given power.

Package

physical-quantities.

Source

units.lisp.

Function: prefix-and (&rest functions)
Package

physical-quantities.

Source

unit-database.lisp.

Function: prefix-base (base &optional mod)
Package

physical-quantities.

Source

unit-database.lisp.

Function: prefix-list (base &rest powers)
Package

physical-quantities.

Source

unit-database.lisp.

Function: prefix-or (&rest functions)
Package

physical-quantities.

Source

unit-database.lisp.

Function: prefix-range (base power-min power-max)
Package

physical-quantities.

Source

unit-database.lisp.

Function: py+ (&rest numbers)

Pythagorean addition

Package

physical-quantities.

Source

utils.lisp.

Function: q-op-insert (tree)
Package

physical-quantities.

Source

numeric.lisp.

Function: quantile (p)

Calculates the quantile for the normal distribution.

Package

physical-quantities.

Source

utils.lisp.

Function: r-function-a (x)

Helper for the inverf function.

Package

physical-quantities.

Source

utils.lisp.

Function: r-function-b (x)

Helper for the inverf function.

Package

physical-quantities.

Source

utils.lisp.

Function: re (val err)
Package

physical-quantities.

Source

quantity.lisp.

Function: read-quantity (stream char1 char2)

The read macro #q(...) is an abbreviation for (quantity ...) which does not transform lowercase symbols to uppercase for unit factors.

Package

physical-quantities.

Source

read-macro.lisp.

Function: read-unit (stream char1 char2)

The read macro #u(...) is an abbreviation for (mkunit ...) which does not transform lowercase symbols to uppercase.

Package

physical-quantities.

Source

read-macro.lisp.

Function: reduce-unit (unit)

Reduces the powers of duplicate unit factors in a given unit, e.g. km^2 / km -> km, but m / km -> m / km. No unit lookup is made.

Package

physical-quantities.

Source

units.lisp.

Function: root-unit (unit index)

Extracts the root from the given unit if possible. Converts to base units if necessary.

Package

physical-quantities.

Source

units.lisp.

Function: round-to (number digits &optional place)
Package

physical-quantities.

Source

numeric.lisp.

Function: sort-unit (unit)

Sorts the unit by positive and negative powers.

Package

physical-quantities.

Source

units.lisp.

Function: split (test sequence &key key)
Package

physical-quantities.

Source

utils.lisp.

Function: symb (&rest args)
Package

physical-quantities.

Source

utils.lisp.

Function: symbol-prefix (prefix symbols)
Package

physical-quantities.

Source

unit-database.lisp.

Function: table-check (name aliases abbrevs)
Package

physical-quantities.

Source

unit-database.lisp.

Function: table-insert (name aliases abbrevs def)
Package

physical-quantities.

Source

unit-database.lisp.

Function: uf-equal (a b)
Package

physical-quantities.

Source

unit-factor.lisp.

Function: uf-pow (unit-factor power)
Package

physical-quantities.

Source

unit-factor.lisp.

Function: unit-factor-p (object)
Package

physical-quantities.

Source

unit-factor.lisp.

Function: unit-has-unit-p (unit)
Package

physical-quantities.

Source

units.lisp.

Function: unit-hash-key-check (key)
Package

physical-quantities.

Source

unit-database.lisp.

Function: unitlessp (quantity)

Checks whether the given quantity is unitless.

Package

physical-quantities.

Source

quantity.lisp.

Function: unzip (list)
Package

physical-quantities.

Source

utils.lisp.

Function: xnor (&rest forms)
Package

physical-quantities.

Source

utils.lisp.


5.2.4 Generic functions

Generic Reader: error-direct (object)
Package

physical-quantities.

Methods
Reader Method: error-direct ((quantity quantity))

automatically generated reader method

Source

quantity.lisp.

Target Slot

error.

Generic Writer: (setf error-direct) (object)
Package

physical-quantities.

Methods
Writer Method: (setf error-direct) ((quantity quantity))

automatically generated writer method

Source

quantity.lisp.

Target Slot

error.

Generic Function: eval-quantity (value error unit-a unit-b)
Package

physical-quantities.

Source

quantity.lisp.

Methods
Method: eval-quantity ((q quantity) (error (eql 0)) (unit-a (eql nil)) unit-b)
Method: eval-quantity ((q quantity) (error (eql 0)) unit-a (unit-b (eql nil)))
Method: eval-quantity ((value quantity) (error (eql 0)) (unit-a (eql nil)) (unit-b (eql nil)))
Method: eval-quantity ((value number) (error number) unit-a unit-b)
Method: eval-quantity ((value number) (error number) unit-a (unit-b (eql nil)))

5.2.5 Conditions

Condition: quantity-definition-error

Generic error for quantity definitions.

Package

physical-quantities.

Source

conditions.lisp.

Direct superclasses

physical-quantities-error.

Direct subclasses
Condition: quantity-definition-semantic-error

Semantic error in the definition of a quantity/unit

Package

physical-quantities.

Source

conditions.lisp.

Direct superclasses

quantity-definition-error.

Condition: quantity-definition-syntax-error

Syntax error in the definition of a quantity/unit

Package

physical-quantities.

Source

conditions.lisp.

Direct superclasses

quantity-definition-error.


5.2.6 Structures

Structure: unit-factor
Package

physical-quantities.

Source

unit-factor.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: unit
Type

string

Initform

""

Readers

uf-unit.

Writers

(setf uf-unit).

Slot: power
Type

integer

Initform

0

Readers

uf-power.

Writers

(setf uf-power).


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
A   B   C   D   E   F   G   H   I   L   M   N   P   Q   R   S   T   U   V   W   X  
Index Entry  Section

(
(setf absolute-error): Public generic functions
(setf absolute-error): Public generic functions
(setf aerr): Public generic functions
(setf error-direct): Private generic functions
(setf error-direct): Private generic functions
(setf relative-error): Public generic functions
(setf relative-error): Public generic functions
(setf rerr): Public generic functions
(setf uf-power): Public ordinary functions
(setf uf-unit): Public ordinary functions
(setf unit): Public generic functions
(setf unit): Public generic functions
(setf value): Public generic functions
(setf value): Public generic functions

A
absolute-error: Public generic functions
absolute-error: Public generic functions
ae: Private ordinary functions
aerr: Public generic functions

B
beta: Private ordinary functions

C
chebyshev-polynomial: Private ordinary functions
chebyshev-polynomial%: Private ordinary functions
clear-units: Private ordinary functions
collect-factors: Private ordinary functions
confidence-interval: Private ordinary functions
convert-to-base-units: Public ordinary functions
convert-unit: Public ordinary functions
convert-unit%: Private ordinary functions
copy-hash-table: Private ordinary functions
copy-unit: Private ordinary functions
copy-unit-factor: Private ordinary functions

D
define-read-macros: Public ordinary functions
define-si-units: Public ordinary functions
define-unit: Public macros
define-unit%: Private ordinary functions
define-unit-prefix: Public macros
define-unit-prefix%: Private ordinary functions
defqop: Public macros
dereference-unit: Private ordinary functions
divide-units: Private ordinary functions
dup-quantity: Private macros

E
erf: Private ordinary functions
error-direct: Private generic functions
error-direct: Private generic functions
error-propagation: Private macros
errorlessp: Private ordinary functions
eval-quantity: Private generic functions
eval-quantity: Private generic functions
eval-quantity: Private generic functions
eval-quantity: Private generic functions
eval-quantity: Private generic functions
eval-quantity: Private generic functions
expand-unit: Private ordinary functions
expand-unit-factor: Private ordinary functions

F
f-error: Private macros
Function, (setf uf-power): Public ordinary functions
Function, (setf uf-unit): Public ordinary functions
Function, ae: Private ordinary functions
Function, beta: Private ordinary functions
Function, chebyshev-polynomial: Private ordinary functions
Function, chebyshev-polynomial%: Private ordinary functions
Function, clear-units: Private ordinary functions
Function, collect-factors: Private ordinary functions
Function, confidence-interval: Private ordinary functions
Function, convert-to-base-units: Public ordinary functions
Function, convert-unit: Public ordinary functions
Function, convert-unit%: Private ordinary functions
Function, copy-hash-table: Private ordinary functions
Function, copy-unit: Private ordinary functions
Function, copy-unit-factor: Private ordinary functions
Function, define-read-macros: Public ordinary functions
Function, define-si-units: Public ordinary functions
Function, define-unit%: Private ordinary functions
Function, define-unit-prefix%: Private ordinary functions
Function, dereference-unit: Private ordinary functions
Function, divide-units: Private ordinary functions
Function, erf: Private ordinary functions
Function, errorlessp: Private ordinary functions
Function, expand-unit: Private ordinary functions
Function, expand-unit-factor: Private ordinary functions
Function, has-error-p: Private ordinary functions
Function, has-key: Private ordinary functions
Function, has-unit-p: Private ordinary functions
Function, have: Private ordinary functions
Function, inverf: Private ordinary functions
Function, l=: Private ordinary functions
Function, l>: Private ordinary functions
Function, ll=: Private ordinary functions
Function, lookup-unit: Private ordinary functions
Function, make-quantity: Public ordinary functions
Function, make-quantity%: Private ordinary functions
Function, make-uf: Private ordinary functions
Function, make-unit: Public ordinary functions
Function, mklist: Private ordinary functions
Function, mkstr: Private ordinary functions
Function, multiply-units: Private ordinary functions
Function, p-value: Private ordinary functions
Function, power-unit: Private ordinary functions
Function, prefix-and: Private ordinary functions
Function, prefix-base: Private ordinary functions
Function, prefix-list: Private ordinary functions
Function, prefix-or: Private ordinary functions
Function, prefix-range: Private ordinary functions
Function, py+: Private ordinary functions
Function, q*: Public ordinary functions
Function, q+: Public ordinary functions
Function, q-: Public ordinary functions
Function, q-op-insert: Private ordinary functions
Function, q/: Public ordinary functions
Function, q/=: Public ordinary functions
Function, qabs: Public ordinary functions
Function, qacos: Public ordinary functions
Function, qacosh: Public ordinary functions
Function, qasin: Public ordinary functions
Function, qasinh: Public ordinary functions
Function, qatan: Public ordinary functions
Function, qatanh: Public ordinary functions
Function, qcos: Public ordinary functions
Function, qcosh: Public ordinary functions
Function, qequal: Public ordinary functions
Function, qequalp: Public ordinary functions
Function, qexp: Public ordinary functions
Function, qexpt: Public ordinary functions
Function, qln: Public ordinary functions
Function, qlog: Public ordinary functions
Function, qpow: Public ordinary functions
Function, qroot: Public ordinary functions
Function, qround: Public ordinary functions
Function, qsin: Public ordinary functions
Function, qsinh: Public ordinary functions
Function, qsqrt: Public ordinary functions
Function, qtan: Public ordinary functions
Function, qtanh: Public ordinary functions
Function, quantile: Private ordinary functions
Function, quantityp: Public ordinary functions
Function, r-function-a: Private ordinary functions
Function, r-function-b: Private ordinary functions
Function, re: Private ordinary functions
Function, read-quantity: Private ordinary functions
Function, read-unit: Private ordinary functions
Function, reduce-unit: Private ordinary functions
Function, root-unit: Private ordinary functions
Function, round-to: Private ordinary functions
Function, sort-unit: Private ordinary functions
Function, split: Private ordinary functions
Function, str-unit: Public ordinary functions
Function, symb: Private ordinary functions
Function, symbol-prefix: Private ordinary functions
Function, table-check: Private ordinary functions
Function, table-insert: Private ordinary functions
Function, uf-equal: Private ordinary functions
Function, uf-pow: Private ordinary functions
Function, uf-power: Public ordinary functions
Function, uf-unit: Public ordinary functions
Function, unit-factor-p: Private ordinary functions
Function, unit-has-unit-p: Private ordinary functions
Function, unit-hash-key-check: Private ordinary functions
Function, unitlessp: Private ordinary functions
Function, unitp: Public ordinary functions
Function, units-convertible: Public ordinary functions
Function, units-equal: Public ordinary functions
Function, units-equalp: Public ordinary functions
Function, unzip: Private ordinary functions
Function, xnor: Private ordinary functions

G
Generic Function, (setf absolute-error): Public generic functions
Generic Function, (setf aerr): Public generic functions
Generic Function, (setf error-direct): Private generic functions
Generic Function, (setf relative-error): Public generic functions
Generic Function, (setf rerr): Public generic functions
Generic Function, (setf unit): Public generic functions
Generic Function, (setf value): Public generic functions
Generic Function, absolute-error: Public generic functions
Generic Function, aerr: Public generic functions
Generic Function, error-direct: Private generic functions
Generic Function, eval-quantity: Private generic functions
Generic Function, q<: Public generic functions
Generic Function, q<=: Public generic functions
Generic Function, q=: Public generic functions
Generic Function, q>: Public generic functions
Generic Function, q>=: Public generic functions
Generic Function, relative-error: Public generic functions
Generic Function, rerr: Public generic functions
Generic Function, unit: Public generic functions
Generic Function, value: Public generic functions

H
has-error-p: Private ordinary functions
has-key: Private ordinary functions
has-unit-p: Private ordinary functions
have: Private ordinary functions

I
inverf: Private ordinary functions

L
l=: Private ordinary functions
l>: Private ordinary functions
ll=: Private ordinary functions
lookup-unit: Private ordinary functions

M
Macro, define-unit: Public macros
Macro, define-unit-prefix: Public macros
Macro, defqop: Public macros
Macro, dup-quantity: Private macros
Macro, error-propagation: Private macros
Macro, f-error: Private macros
Macro, mkunit: Public macros
Macro, nand: Private macros
Macro, qop: Public macros
Macro, quantity: Public macros
Macro, with-gensyms: Private macros
Macro, with-local-units: Public macros
Macro, with-saved-units: Public macros
Macro, with-unit-lookup: Private macros
make-quantity: Public ordinary functions
make-quantity%: Private ordinary functions
make-uf: Private ordinary functions
make-unit: Public ordinary functions
Method, (setf absolute-error): Public generic functions
Method, (setf error-direct): Private generic functions
Method, (setf relative-error): Public generic functions
Method, (setf unit): Public generic functions
Method, (setf value): Public generic functions
Method, absolute-error: Public generic functions
Method, error-direct: Private generic functions
Method, eval-quantity: Private generic functions
Method, eval-quantity: Private generic functions
Method, eval-quantity: Private generic functions
Method, eval-quantity: Private generic functions
Method, eval-quantity: Private generic functions
Method, print-object: Public standalone methods
Method, q<: Public generic functions
Method, q<: Public generic functions
Method, q<: Public generic functions
Method, q<: Public generic functions
Method, q<=: Public generic functions
Method, q<=: Public generic functions
Method, q<=: Public generic functions
Method, q<=: Public generic functions
Method, q=: Public generic functions
Method, q=: Public generic functions
Method, q=: Public generic functions
Method, q=: Public generic functions
Method, q>: Public generic functions
Method, q>: Public generic functions
Method, q>: Public generic functions
Method, q>: Public generic functions
Method, q>=: Public generic functions
Method, q>=: Public generic functions
Method, q>=: Public generic functions
Method, q>=: Public generic functions
Method, relative-error: Public generic functions
Method, unit: Public generic functions
Method, value: Public generic functions
mklist: Private ordinary functions
mkstr: Private ordinary functions
mkunit: Public macros
multiply-units: Private ordinary functions

N
nand: Private macros

P
p-value: Private ordinary functions
power-unit: Private ordinary functions
prefix-and: Private ordinary functions
prefix-base: Private ordinary functions
prefix-list: Private ordinary functions
prefix-or: Private ordinary functions
prefix-range: Private ordinary functions
print-object: Public standalone methods
py+: Private ordinary functions

Q
q*: Public ordinary functions
q+: Public ordinary functions
q-: Public ordinary functions
q-op-insert: Private ordinary functions
q/: Public ordinary functions
q/=: Public ordinary functions
q<: Public generic functions
q<: Public generic functions
q<: Public generic functions
q<: Public generic functions
q<: Public generic functions
q<=: Public generic functions
q<=: Public generic functions
q<=: Public generic functions
q<=: Public generic functions
q<=: Public generic functions
q=: Public generic functions
q=: Public generic functions
q=: Public generic functions
q=: Public generic functions
q=: Public generic functions
q>: Public generic functions
q>: Public generic functions
q>: Public generic functions
q>: Public generic functions
q>: Public generic functions
q>=: Public generic functions
q>=: Public generic functions
q>=: Public generic functions
q>=: Public generic functions
q>=: Public generic functions
qabs: Public ordinary functions
qacos: Public ordinary functions
qacosh: Public ordinary functions
qasin: Public ordinary functions
qasinh: Public ordinary functions
qatan: Public ordinary functions
qatanh: Public ordinary functions
qcos: Public ordinary functions
qcosh: Public ordinary functions
qequal: Public ordinary functions
qequalp: Public ordinary functions
qexp: Public ordinary functions
qexpt: Public ordinary functions
qln: Public ordinary functions
qlog: Public ordinary functions
qop: Public macros
qpow: Public ordinary functions
qroot: Public ordinary functions
qround: Public ordinary functions
qsin: Public ordinary functions
qsinh: Public ordinary functions
qsqrt: Public ordinary functions
qtan: Public ordinary functions
qtanh: Public ordinary functions
quantile: Private ordinary functions
quantity: Public macros
quantityp: Public ordinary functions

R
r-function-a: Private ordinary functions
r-function-b: Private ordinary functions
re: Private ordinary functions
read-quantity: Private ordinary functions
read-unit: Private ordinary functions
reduce-unit: Private ordinary functions
relative-error: Public generic functions
relative-error: Public generic functions
rerr: Public generic functions
root-unit: Private ordinary functions
round-to: Private ordinary functions

S
sort-unit: Private ordinary functions
split: Private ordinary functions
str-unit: Public ordinary functions
symb: Private ordinary functions
symbol-prefix: Private ordinary functions

T
table-check: Private ordinary functions
table-insert: Private ordinary functions

U
uf-equal: Private ordinary functions
uf-pow: Private ordinary functions
uf-power: Public ordinary functions
uf-unit: Public ordinary functions
unit: Public generic functions
unit: Public generic functions
unit-factor-p: Private ordinary functions
unit-has-unit-p: Private ordinary functions
unit-hash-key-check: Private ordinary functions
unitlessp: Private ordinary functions
unitp: Public ordinary functions
units-convertible: Public ordinary functions
units-equal: Public ordinary functions
units-equalp: Public ordinary functions
unzip: Private ordinary functions

V
value: Public generic functions
value: Public generic functions

W
with-gensyms: Private macros
with-local-units: Public macros
with-saved-units: Public macros
with-unit-lookup: Private macros

X
xnor: Private ordinary functions


A.4 Data types

Jump to:   C   E   F   I   N   O   P   Q   R   S   U  
Index Entry  Section

C
Class, quantity: Public classes
Condition, error-propagation-error: Public conditions
Condition, invalid-unit-conversion-error: Public conditions
Condition, invalid-unit-error: Public conditions
Condition, invalid-unit-operation-error: Public conditions
Condition, invalid-unit-reference-error: Public conditions
Condition, operation-undefined-error: Public conditions
Condition, physical-quantities-error: Public conditions
Condition, quantity-definition-error: Private conditions
Condition, quantity-definition-semantic-error: Private conditions
Condition, quantity-definition-syntax-error: Private conditions
Condition, unit-definition-conflict-error: Public conditions
Condition, unit-definition-error: Public conditions
Condition, unit-definition-semantic-error: Public conditions
Condition, unit-definition-syntax-error: Public conditions
conditions.lisp: The physical-quantities/conditions․lisp file

E
error-propagation-error: Public conditions

F
File, conditions.lisp: The physical-quantities/conditions․lisp file
File, numeric.lisp: The physical-quantities/numeric․lisp file
File, package.lisp: The physical-quantities/package․lisp file
File, parse-rules.lisp: The physical-quantities/parse-rules․lisp file
File, physical-quantities.asd: The physical-quantities/physical-quantities․asd file
File, quantity.lisp: The physical-quantities/quantity․lisp file
File, read-macro.lisp: The physical-quantities/read-macro․lisp file
File, si-units.lisp: The physical-quantities/si-units․lisp file
File, unit-database.lisp: The physical-quantities/unit-database․lisp file
File, unit-factor.lisp: The physical-quantities/unit-factor․lisp file
File, units.lisp: The physical-quantities/units․lisp file
File, utils.lisp: The physical-quantities/utils․lisp file

I
invalid-unit-conversion-error: Public conditions
invalid-unit-error: Public conditions
invalid-unit-operation-error: Public conditions
invalid-unit-reference-error: Public conditions

N
numeric.lisp: The physical-quantities/numeric․lisp file

O
operation-undefined-error: Public conditions

P
Package, physical-quantities: The physical-quantities package
package.lisp: The physical-quantities/package․lisp file
parse-rules.lisp: The physical-quantities/parse-rules․lisp file
physical-quantities: The physical-quantities system
physical-quantities: The physical-quantities package
physical-quantities-error: Public conditions
physical-quantities.asd: The physical-quantities/physical-quantities․asd file

Q
quantity: Public classes
quantity-definition-error: Private conditions
quantity-definition-semantic-error: Private conditions
quantity-definition-syntax-error: Private conditions
quantity.lisp: The physical-quantities/quantity․lisp file

R
read-macro.lisp: The physical-quantities/read-macro․lisp file

S
si-units.lisp: The physical-quantities/si-units․lisp file
Structure, unit-factor: Private structures
System, physical-quantities: The physical-quantities system

U
unit-database.lisp: The physical-quantities/unit-database․lisp file
unit-definition-conflict-error: Public conditions
unit-definition-error: Public conditions
unit-definition-semantic-error: Public conditions
unit-definition-syntax-error: Public conditions
unit-factor: Private structures
unit-factor.lisp: The physical-quantities/unit-factor․lisp file
units.lisp: The physical-quantities/units․lisp file
utils.lisp: The physical-quantities/utils․lisp file