financial_maths 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ab56b540f61a10de15d2dc302240b3dabd1cb168
4
- data.tar.gz: bf067c92611f17a233d2c41ff3b8e357a0a8b1c0
3
+ metadata.gz: 04b02170a3ad7239e2f09675d5cdd0a7589864c6
4
+ data.tar.gz: f8ab2f8c2007857eeb0f042cadc11037e819f0da
5
5
  SHA512:
6
- metadata.gz: c8b0fa5f735499cdb63e7b1e36c393590c1169fb2e9f01e8ce48f4d05df8c3a4948eed59b5d95f1a1e6f2ed3a389d0a8a061628e0d1d72a5a0abd48c0cf253d7
7
- data.tar.gz: 9dd4900b97ed424cf5331325637c5698ce16b0402c6f55e223d0e61571713430fef85d31f6bc6bf7754afb9203abe0ce1e81d7f1603ef4bea524998bb3b0024a
6
+ metadata.gz: 9af1f0dbce744ef3b590262e7505bfcd3472b7495d62a7f159cd9e2c5f3188a1053a899ec12403b023f1b6a0ca07d1029d917db25f1004020fc7a25db89c5236
7
+ data.tar.gz: 35021e2b5fe02bae0b64d2405041e785c34c79fe3e138f7f8cdf55da780b4a85ec4ba7d03bdafdbd6b595b716ec728abe0baa901c45a69c120b014cffb08690d
@@ -1,3 +1,3 @@
1
1
  module FinancialMaths
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -129,7 +129,7 @@ module FinancialMaths
129
129
  # toAnticipated = nominalRate / 1 + nominalRate
130
130
  # Returned -> toAnticipated * PERIODS
131
131
  def nominal_anticipated_given_efective(effective_rate, periods)
132
- nominalRate = (1+(effective_rate.to_f/100))**(1/periods.to_f)-1;
132
+ nominalRate = (1+(effective_rate.to_f/100))**(1/periods.to_f)-1
133
133
  toAnticipated = nominalRate / (1+nominalRate)
134
134
  (toAnticipated * periods.to_f * 100).round(4)
135
135
  end
@@ -145,7 +145,7 @@ module FinancialMaths
145
145
  # Description: Find nominal rate expired given effective rate - EFNV
146
146
  # Formula: (1 - ((1 / (TASA EFECTIVA + 1))^(1/PERIODOS))
147
147
  def anticipated_interest(rate, periods)
148
- (1 - (( 1 / ( rate.to_f + 1 )) ** (1 / periods)))
148
+ (1 - (( 1 / ( rate.to_f + 1 )) ** (1.0 / periods)))
149
149
  end
150
150
 
151
151
  # == End conversion rates
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: financial_maths
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ruben Espinosa