|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Financial.Rate Cannot calculate rate using the arguments providedI'm getting this error when running this program:
Cannot calculate rate using the arguments provided Module Module1 Sub Main() Rate(360, -694.44444444444446, 244274.69178082192) End Sub End Module This is a vb console application, has anybody seen this before? how can I fix this? From the docs:
"Rate is calculated by iteration. Starting with the value of Guess, Rate cycles through the calculation until the result is accurate to within 0.00001 percent. If Rate cannot find a result after 20 tries, it fails. If your guess is 10 percent and Rate fails, try a different value for Guess" Provide a different value for the Guess parameter (default is 0.1). 0.01 seems to be working for those particular parameters /claes Show quoteHide quote "Programador" <Programa***@discussions.microsoft.com> wrote in message news:13F1C63D-A847-40B8-B810-20F009C6E2D1@microsoft.com... > I'm getting this error when running this program: > Cannot calculate rate using the arguments provided > > Module Module1 > > Sub Main() > > Rate(360, -694.44444444444446, 244274.69178082192) > End Sub > > End Module > > This is a vb console application, has anybody seen this before? how can I > fix this? How can you have a payment of -694.44444444444446 or a balance of
244274.69178082192? Just curious. As far as I know, US Dollars have to be paid in increments of .01. At least the mortgage companies I've worked at for over 20 years have required it that way. I don't think their servicing software will accept payments down to one trillionith of a penny anyway. I can't think of any real world scenario where that would make sense, and, it will return non-sense results for your Rate calculation. If you round your figures to the nearest penny your function should not only work but should also return an accurate rate. Regards, Don On Mon, 27 Mar 2006 14:11:01 -0800, Programador <Programa***@discussions.microsoft.com> wrote: Show quoteHide quote >I'm getting this error when running this program: >Cannot calculate rate using the arguments provided > >Module Module1 > > Sub Main() > > Rate(360, -694.44444444444446, 244274.69178082192) > End Sub > >End Module > >This is a vb console application, has anybody seen this before? how can I >fix this? I have come across several instances where financial calculations use 4
decimal places until the final result is rounded to 2 decimal places. One example is fuel e.g. 1.8990 per gallon Show quoteHide quote "Don" <don81846@NO_CaCa.Earthlink.net> wrote in message news:chik22hupkq9romu65pa3k2c58l7nta0i4@4ax.com... > > How can you have a payment of -694.44444444444446 or a balance of > 244274.69178082192? Just curious. As far as I know, US Dollars have to > be paid in increments of .01. At least the mortgage companies I've > worked at for over 20 years have required it that way. I don't think > their servicing software will accept payments down to one trillionith > of a penny anyway. > > I can't think of any real world scenario where that would make sense, > and, it will return non-sense results for your Rate calculation. > > If you round your figures to the nearest penny your function should > not only work but should also return an accurate rate. > > Regards, > > Don > > On Mon, 27 Mar 2006 14:11:01 -0800, Programador > <Programa***@discussions.microsoft.com> wrote: > >>I'm getting this error when running this program: >>Cannot calculate rate using the arguments provided >> >>Module Module1 >> >> Sub Main() >> >> Rate(360, -694.44444444444446, 244274.69178082192) >> End Sub >> >>End Module >> >>This is a vb console application, has anybody seen this before? how can I >>fix this? The mathematical formula for calculating the periodic payment required
to amortize an amount will result in a theoretical payment amount. E.g. -694.44444444444446 as in the original post. Using that figure in the Rate calculation will give an equally theoretical result. Try to give the gas station attendant 9.495 for 5 gallons of gas at 1.899 per gallon. As I said: "As far as I know, US Dollars have to be **PAID** in increments of ..01." My post wasn't meant to be as strident as it may have sounded. Regards, Don On Thu, 30 Mar 2006 05:22:00 -0800, "Jim Hughes" <NOSPAMJ3033@Hotmail.com> wrote: Show quoteHide quote >I have come across several instances where financial calculations use 4 >decimal places until the final result is rounded to 2 decimal places. > >One example is fuel e.g. 1.8990 per gallon > >"Don" <don81846@NO_CaCa.Earthlink.net> wrote in message >news:chik22hupkq9romu65pa3k2c58l7nta0i4@4ax.com... >> >> How can you have a payment of -694.44444444444446 or a balance of >> 244274.69178082192? Just curious. As far as I know, US Dollars have to >> be paid in increments of .01. At least the mortgage companies I've >> worked at for over 20 years have required it that way. I don't think >> their servicing software will accept payments down to one trillionith >> of a penny anyway. >> >> I can't think of any real world scenario where that would make sense, >> and, it will return non-sense results for your Rate calculation. >> >> If you round your figures to the nearest penny your function should >> not only work but should also return an accurate rate. >> >> Regards, >> >> Don >> >> On Mon, 27 Mar 2006 14:11:01 -0800, Programador >> <Programa***@discussions.microsoft.com> wrote: >> >>>I'm getting this error when running this program: >>>Cannot calculate rate using the arguments provided >>> >>>Module Module1 >>> >>> Sub Main() >>> >>> Rate(360, -694.44444444444446, 244274.69178082192) >>> End Sub >>> >>>End Module >>> >>>This is a vb console application, has anybody seen this before? how can I >>>fix this? >
which is better
Deployment without Framework? Re: Newbie needs help temporarily pausing loop Problem with - Edit Item of Collections.Generic.List(Of SearchAreaListItem) Shell to DOS Abstract/Base Class Best Practices - Help How to read S.M.A.R.T. attributes in vb ? Instance of derived class does not show public methods or properties that are not in the inherited c Help VS 2005 Dead in Water for VB project layout on screen keeps changing.. Arg |
|||||||||||||||||||||||