README.md in congruence_solver-0.3.0 vs README.md in congruence_solver-0.3.1
- old
+ new
@@ -1,28 +1,37 @@
# CongruenceSolver
CongruenceSolver is a gem for solving polynomial congruences. Should you ever need to solve polynomial congruences and have Ruby installed, this is the gem for you!
+## Polynomial Congruences
+
+Polynomial congruences are the central topic of most elementary number theory and abstract algebra curricula. Similar to an equation, a [congruence](https://en.wikipedia.org/wiki/Modular_equation) is an [equivalence relation](https://en.wikipedia.org/wiki/Equivalence_relation) arising from [modular arithmetic](https://en.wikipedia.org/wiki/Modular_arithmetic) (also knowsn as "clock arithmetic"). For example, the idea "5 hours past 8 is 1" is expressed in the congruence ```8 + 5 = 1 mod 12```. A polynomial congruence is simply a congruence involving a polynomial, like ```x + 5 = 1 mod 12```. The problem of solving a congruence is to find all inputs satisfying the congruence, much like solving an equation (in this case, ```x = 8```). Generally speaking, congruences become more difficult to solve as the degree of the polynomial and the modulus grow. Elementary number theory develops tools like [Hensel Lifting](https://en.wikipedia.org/wiki/Hensel%27s_lemma#Hensel_Lifting) for solving polynomial congruences and the [Chinese Remainder Theorem](https://en.wikipedia.org/wiki/Chinese_remainder_theorem) for solving systems of polynomial congruences. This gem leverages these methods as implemented in C in [congruence_solver_ext](https://github.com/laneb/congruence_solver_ext).
+
## Installation
-Add this line to your application's Gemfile:
+With [RubyGems](https://rubygems.org/) on your machine, installation is as easy as
+```shell
+gem install congruence_solver
+```
+You may also install via [bundler](http://bundler.io/), by adding this line to your application's Gemfile:
+
```ruby
gem 'congruence_solver'
```
-And then execute:
+and executing
- $ bundle
+```shell
+$ bundle
+```
-Or install it yourself as:
+in the project directory.
- $ gem install congruence_solver
-
## Usage
-To solve a polynomial congruence at the command line, simply invoke `csolve` and then enter the congruence at the prompt.
+To solve a polynomial congruence at the command line, simply invoke `csolve` and then enter the congruence at the prompt.
```
csolve
Congruence to solve:
x^2 + 2x + 1 = x^3 + 3x^5 mod 49
@@ -45,12 +54,10 @@
CongruenceSolver.solve_congruence(coeffs, mod).sort #=> [1, 8, 15, 22, 26, 29, 36, 43]
```
## Development
-After checking out the repo, run `bundle install` to install dependencies. Then, run `rake spec` to run the tests, or rake bench to run the benchmark.
-
-To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
+After checking out the repo, run `bundle install` to install dependencies and `bundle exec rake update_ext` to pull and compile the extension. Then, run `bundle exec rake spec` to run the tests, or `bundle exec rake bench` to run the benchmark. To build and install this gem onto your local machine, run `bundle exec rake install`.
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/laneb/congruence_solver.