Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pmttavara authored Sep 25, 2018
1 parent 2732cfe commit 0b69a8d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ All of the code is public domain - if you like, you can simply copy-paste the `s
These functions differ slightly from the C standard library *by design* - **to stay fast, they don't do range checking or follow C's precision requirements.** Think of these routines more as "decent approximations", for when you know the particular input domain and you have leeway with the output. Video games are a good example of an appropriate use case.

# API
These functions stick to the C API, but it doesn't implement all of `math.h` - notable exclusions are machine-related functions (e.g. `fma`, `nextafter`), precision-related functions (e.g. `expm1`), complex numbers, and `tgamma`/`lgamma`. But you've got your standard elementary functions and hyperbolic trig as well.
These functions stick to the C API, but it doesn't implement all of `math.h` - notable exclusions are machine-related functions (e.g. `fma`, `nextafter`), precision-related functions (e.g. `expm1`), complex numbers, and `tgamma`/`lgamma`. But the standard elementary functions and hyperbolic trig are included.

# Exceptions to branch-free rule
`atan2` likely compiles to branches; it's hopelessly discontinuous.
`dtoa` is a crappy implementation, included for completion.
- `atan2` likely compiles to branches due to being hopelessly discontinuous.

- An implementation of `dtoa` is included, but like all of the functions, it should only be treated as an approximation.

# Credits
**There are no credits.** I want this library to be easy to use - which means public domain, and no attribution necessary.
Expand Down

0 comments on commit 0b69a8d

Please sign in to comment.