symbolic 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/{README → README.rdoc} +6 -2
  2. data/Rakefile +3 -2
  3. metadata +4 -4
@@ -1,5 +1,9 @@
1
1
  Symbolic math for ruby.
2
2
 
3
+ Symbolic math can be really helpful if you want to simplify some giant equation or if you don't want to get a performance hit re-evaluating big math expressions every time when few variables change.
4
+
5
+ Currently I've implemented only naive optimizations to simplify math expressions, but it's pretty simple to add your own - see Symbolic::Optimizations module for examples.
6
+
3
7
  Available as gem from gemcutter: gem install symbolic
4
8
 
5
9
  Simple example:
@@ -10,8 +14,6 @@ Simple example:
10
14
  y = var :name => 'y'
11
15
 
12
16
  f = (4 - 2*(-x) + y*(-1.0))*x - 0*y + 0 - 2
13
- g = Math.cos(y)
14
-
15
17
  puts f # => (4+2*x-y)*x-2
16
18
 
17
19
  p f.undefined_variables.map &:name # => ["x", "y"]
@@ -20,6 +22,8 @@ Simple example:
20
22
 
21
23
  puts f.value # => 6
22
24
 
25
+
26
+ g = Math.cos(y)
23
27
  puts g # => cos(y)
24
28
  y.value = 0
25
29
  puts g.value # => 1.0
data/Rakefile CHANGED
@@ -5,8 +5,9 @@ begin
5
5
  require 'jeweler'
6
6
  Jeweler::Tasks.new do |gem|
7
7
  gem.name = "symbolic"
8
- gem.version = '0.0.2'
9
- gem.summary = %Q{Symbolic math for ruby}
8
+ gem.version = '0.0.3'
9
+ gem.summary = 'Symbolic math for ruby'
10
+ gem.description = %Q{Symbolic math can be really helpful if you want to simplify some giant equation or if you don't want to get a performance hit re-evaluating big math expressions every time when few variables change.}
10
11
  gem.email = "ravwar@gmail.com"
11
12
  gem.homepage = "http://github.com/brainopia/symbolic"
12
13
  gem.authors = ["brainopia"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: symbolic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - brainopia
@@ -22,17 +22,17 @@ dependencies:
22
22
  - !ruby/object:Gem::Version
23
23
  version: 1.2.9
24
24
  version:
25
- description:
25
+ description: Symbolic math can be really helpful if you want to simplify some giant equation or if you don't want to get a performance hit re-evaluating big math expressions every time when few variables change.
26
26
  email: ravwar@gmail.com
27
27
  executables: []
28
28
 
29
29
  extensions: []
30
30
 
31
31
  extra_rdoc_files:
32
- - README
32
+ - README.rdoc
33
33
  files:
34
34
  - .gitignore
35
- - README
35
+ - README.rdoc
36
36
  - Rakefile
37
37
  - lib/symbolic.rb
38
38
  - spec/spec.opts