Skip to content

Commit

Permalink
Version Bump; XNPV in C
Browse files Browse the repository at this point in the history
  • Loading branch information
tubedude committed Nov 10, 2014
1 parent dcd620d commit 5793c68
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGE_LOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Version 0.3.0

* Moved XNPV function to C.

## Version 0.2.9

* Cashflow validation excludes zeros
Expand Down
9 changes: 0 additions & 9 deletions lib/xirr/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,6 @@ def xnpv(rate)
end
end

# Net Present Value funtion that will be used to reduce the cashflow
# @param rate [BigDecimal]
def xnpv_new(rate)
cf.inject(0) do |sum, t|
# sum += t.amount / (1 + rate) ** t_in_days(t.date)
sum += xnpv_c rate, t.amount, t_in_days(t.date)
end
end

inline do |builder|
builder.include "<math.h>"
builder.c "
Expand Down
2 changes: 1 addition & 1 deletion lib/xirr/version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Xirr
# Version of the Gem
VERSION = "0.2.9"
VERSION = "0.3.0"
end

0 comments on commit 5793c68

Please sign in to comment.