Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jph00 authored Jan 8, 2019
1 parent c4e4a63 commit 2bbd2d7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ Basic math functions for float and double arrays in Swift, with no dependencies.
- Binary functions,: `min`, `max`, `pow`, `atan2`, `copysign`, `fdim`, `fmax`, `fmin`, `hypot`, `nextafter`, `add`, `sub`, `mul`, `div`, `subRev`, `divRev`
- Unary functions,: `acos`, `acosh`, `asin`, `asinh`, `atan`, `atanh`, `cbrt`, `cos`, `cosh`, `erf`, `erfc`, `exp`, `exp2`, `expm1`, `log`, `log10`, `log1p`, `log2`, `logb`, `nearbyint`, `rint`, `sin`, `sinh`, `tan`, `tanh`, `tgamma`

For reasonable performance, compile with `make` (which is also required if you make changes to the `gyb` templates) or use:

swift build -Xswiftc -Ounchecked -Xcc -ffast-math -Xcc -O2 -Xcc -march=native

This library is used by [SwiftyMKL](https://github.com/jph00/SwiftyMKL), which adds more optimized versions of the functions from Intel's Performance Libraries, along with various linear algebra and statistical functions.

Math functions from `Foundation` (which in turn uses functions in `math.h`) are used, except for `sum()`, which is written in C, since reductions in Swift are currently not vectorized. The standard math operators are also provided, including optimzed assignment versions. Functions with `_` suffix are in-place.
Expand Down

0 comments on commit 2bbd2d7

Please sign in to comment.