Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dankogai committed Feb 10, 2016
1 parent 77ed7e2 commit a5d5a3e
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Protocol-Oriented Number System in Pure Swift
import PONS // Let the fun begin!
````

BigInt included. Enjoy unlimited!
Big integer included. Enjoy unlimited!

````swift
let bn = BigInt(1)<<64 + 1 // 18446744073709551617
Expand All @@ -23,9 +23,9 @@ bn * bn // 340282366920938463500268095579187314689
bn / bn // 1
````

Rational (number type) is also included.
Rational number also included.

````
````swift
let bq = BigInt(1).over(bn) // (1/18446744073709551617)
bq + bq // (2/18446744073709551617)
bq - bq // (0/1)
Expand All @@ -45,11 +45,14 @@ bz * bz // ((0/1)+(2/340282366920938463500268095579187314689).i)
bz / bz // ((1/1)+(0/1).i)
````

Elementary functions are supported as static functions,
[Elementary function]s (as in `<math.h>`) are supported as static functions,
By default it just converts to `Double`, let `Darwin` (or `Glibc` on Linux) do the work,
and convertsit back by default.

TODO: rewrite elementary functions generically!
[Elementary function]: https://en.wikipedia.org/wiki/Elementary_function


*TODO*: rewrite elementary functions generically!

````swift
Double.sqrt(-1) // sadly NaN
Expand Down

0 comments on commit a5d5a3e

Please sign in to comment.