The floating-point-contractions Reference Manual

Next: , Previous: , Up: (dir)   [Contents][Index]

The floating-point-contractions Reference Manual

This is the floating-point-contractions Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 04:33:49 2022 GMT+0.

Table of Contents


1 Introduction

This system provides some numerically stable, contracted versions of
common but unstable floating-point operations.

| Export   | (AKA)    | Computes        |
|----------+----------+-----------------|
| log1+    | log1p    | log (1 + x)     |
| log1-    | log1m    | log (1 - x)     |
| log1+/x  |          | (log (1 + x))/x |
| exp-1    | expm1    | exp(x) - 1      |
| exp-1/x  |          | (exp(x)-1)/x    |
| expt-1   | powm1    | (x^y)-1         |
| log1-exp | log1mexp | log(1 - exp(x)) |
| log1+exp | log1pexp | log(1 + exp(x)) |
| log2-exp | log2mexp | log(2 - exp(x)) |
| logexp-1 | logexpm1 | log(exp(a) -1)  |
| hypot    |          | sqrt(x^2 + y^2) |


2 Systems

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


Previous: , Up: Systems   [Contents][Index]

2.1 floating-point-contractions

Numerically stable contractions of floating-point operations.

Author

Paul M. Rodriguez <pmr@ruricolist.com>

License

MIT

Source

floating-point-contractions.asd.

Child Components

3 Files

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


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


3.1.1 floating-point-contractions/floating-point-contractions.asd

Source

floating-point-contractions.asd.

Parent Component

floating-point-contractions (system).

ASDF Systems

floating-point-contractions.


3.1.3 floating-point-contractions/floating-point-contractions.lisp

Dependency

package.lisp (file).

Source

floating-point-contractions.asd.

Parent Component

floating-point-contractions (system).

Public Interface
Internals

sq (function).


4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 floating-point-contractions

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

sq (function).


5 Definitions

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


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Public Interface


5.1.1 Ordinary functions

Function: exp-1 (x)

Compute (- (exp x) 1) stably even when X is near zero.

Package

floating-point-contractions.

Source

floating-point-contractions.lisp.

Function: exp-1/x (x)

Compute (/ (- (exp x) 1) x) stably even when X is near zero.

Package

floating-point-contractions.

Source

floating-point-contractions.lisp.

Function: expt-1 (a z)

Compute (a^z)-1 stably even when A is close to 1 or Z is close to zero.

Package

floating-point-contractions.

Source

floating-point-contractions.lisp.

Function: hypot (x y)

Compute the hypotenuse of X and Y without danger of floating-point overflow or underflow.

Package

floating-point-contractions.

Source

floating-point-contractions.lisp.

Function: lb (n)

Binary logarithm.

Package

floating-point-contractions.

Source

floating-point-contractions.lisp.

Function: lg (n)

Decimal logarithm.

Package

floating-point-contractions.

Source

floating-point-contractions.lisp.

Function: ln (n)

Natural logarithm.

Package

floating-point-contractions.

Source

floating-point-contractions.lisp.

Function: log1+ (x)

Compute (log (+ 1 x)) stably even when X is near zero.

Package

floating-point-contractions.

Source

floating-point-contractions.lisp.

Function: log1+/x (x)

Compute (/ (log (+ 1 x)) x) stably even when X is near zero.

Package

floating-point-contractions.

Source

floating-point-contractions.lisp.

Function: log1+exp (a)

Accurately compute log(1+exp(x)) even when A is near zero.

Package

floating-point-contractions.

Source

floating-point-contractions.lisp.

Function: log1- (x)

Compute (log (- 1 x)) stably even when X is near zero.

Package

floating-point-contractions.

Source

floating-point-contractions.lisp.

Function: log1-exp (a)

Compute log(1-exp(x)) stably even when A is near zero.

This is sometimes known as the E_3, the third Einstein function.

See Mächler 2008 for notes on accurate calculation.

https://cran.r-project.org/web/packages/Rmpfr/vignettes/log1mexp-note.pdf

Package

floating-point-contractions.

Source

floating-point-contractions.lisp.

Function: log2-exp (x)

Compute log(2-exp(x)) stably even when X is near zero.

Package

floating-point-contractions.

Source

floating-point-contractions.lisp.

Function: logexp-1 (a)

Compute log(exp(a)-1) stably even when A is small.

Package

floating-point-contractions.

Source

floating-point-contractions.lisp.


5.2 Internals


Previous: , Up: Internals   [Contents][Index]

5.2.1 Ordinary functions

Function: sq (x)
Package

floating-point-contractions.

Source

floating-point-contractions.lisp.


Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts


Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables