| View previous topic :: View next topic |
| Author |
Message |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Thu Jan 16, 2003 1:38 am Post subject: |
|
|
for example, 4 square is also 4 to the power of 2 which is the same as 4 x 4
but to work out 10 to the power of 1/12, you can't use straight times, you need to have the function built in to vds to work it out exactly
for example, the square root of 2 is 2 to the power or 0.5 and this is equal to 1.414........
Serge _________________
|
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Jan 16, 2003 1:45 am Post subject: |
|
|
I know how exponentials work.
So what is the result/answer of "10 to the power of 1/12"?
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Thu Jan 16, 2003 1:58 pm Post subject: |
|
|
ok, sorry mac! i guess i misunderstood your post...
10 to the power of 1/12 = 1.211527659
to set up the code for arcray, we need to be able to work out exponentials not just for 10 but for any number that he needs, and my point was that vds does not allow that calculation - or am i mistaken in this?
Serge _________________
|
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Jan 16, 2003 2:09 pm Post subject: |
|
|
Hi Mac,
I think 10 to the power of 1/12 = 1.211527658628588446358602933322 But I am not sure if I am doing the calculation right?
1/12 = 0.083333333333333333333333333333333 in decimal format. At least this is what I get when I use Calculator under windows??? _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Jan 16, 2003 2:26 pm Post subject: |
|
|
Sorry I didn't see Serge's post before I posted mine.... _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Thu Jan 16, 2003 2:31 pm Post subject: |
|
|
no problems mindpower, how did you work out your answer? i used my scientific calculator
Serge _________________
|
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Jan 16, 2003 2:32 pm Post subject: |
|
|
Hi Serge,
Yes you are correct in saying that there is no direct math function that can do this calculation in VDS
Is it not true that all math is done by using addition and subtraction? If all math is done by addition and subtraction then this calculation can be figured out because it is just Multiplication done in a loop and I think that is what Mac is trying to say  _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Jan 16, 2003 2:35 pm Post subject: |
|
|
I worked out my answer with the scientific calculator that comes with Windows 2000 Pro... BTW this calculator can do 64bit math with integers or whole numbers older versions of Window's calculator could not handle 64bit whole numbers or 64bit real numbers (i.e. ... floating points) My Gadget.dll will soon handle these types of numbers as well... _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Jan 16, 2003 2:40 pm Post subject: |
|
|
Anyway I am not having the problem of figuring out the 10 to the power of 1/12...I need to know what all the numbers are for in the formula. I hate when mathmaticians do not specify all the members of a formula when they are giving an example or tutorial Are we supposed to magically know what those numbers relate to? _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Thu Jan 16, 2003 3:05 pm Post subject: |
|
|
i am a maths teacher and i found that the information at the web site mentioned confusing - i even though that at one stage it was contradictory!
Serge _________________
|
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Jan 16, 2003 3:13 pm Post subject: |
|
|
Hi Serge,
That is what I found too. While I am not a math teacher I do calculations all the time. I am a Application performance tester so some of my algorythms can get a bit complex. I can make VDS come up with some of the figures but they are not as percise as what is shown on the website. VDS's floating point functions really need an overhaul. If VDS had good and fast math functions instead of more GUI elements then one could draw the GUI elements they wanted hehehehehehehe Now I think Andy would be better off using an external DLL for this just because of the speed and resolutions of loops in VDS but this calculation is not beyound VDS's ability it would just require a little more work and understanding of the formula is all... _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Jan 16, 2003 3:15 pm Post subject: |
|
|
Serge, whole exponentials can be done in a simple loop,
and I'm sure the fractional ones can be done somehow...
| Code: |
%%number = 12
%%exp = 3
GOSUB Exponent
INFO %%number to the power of %%exp is:@tab()@cr()@cr()%%answer
:CLOSE
EXIT
:Exponent
%%answer = %%number
%x = 1
REPEAT
%%answer = @fmul(%%answer, %%number)
%x = @succ(%x)
UNTIL @equal(%x, %%exp)
exit
|
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Jan 16, 2003 3:22 pm Post subject: |
|
|
Hey mindpower, what formula did ya use to get
10 to the the 1/12 power?
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Thu Jan 16, 2003 3:28 pm Post subject: |
|
|
the exponentials with whole numbers are very easy and very straightforward to do - i am not so sure about the fractional ones
i suspect that an iterative process would be used with increasing accuracy - if you know what i mean
i don't know what that iterative process is...but from what i can gather, icemath does the fractional exponential and hence it is all that ray needs...apart from the code to make it work
Serge _________________
|
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Jan 16, 2003 3:52 pm Post subject: |
|
|
Hi Mac,
Ok since we are dealing with months of a year and the 1/12 is breaking the calculation into months then you just need to do the multiplication of one month x one month in each iteration.
Here is another way which I think is actually better because you know the term of the loan which is 10 months or it could be the full 12 that does not matter because we will solve it backwards. Now if I understand some of the website that was posted you would do this calculation until it equals zero so your loop can loop until the Principle equals @zero() saving the Principle and applying that answer back to the calculation in each pass of the loop not forgetting to add the interest being applied on the interest.... My main question is what is the ratio of interest being applied each month? To do that you have to get the ratio of one month being applied to the full Principle and add that same ratio (i.e. ... not the value but the ratio) each month from the new principle minus lastmonths payment until the Principle equals zero. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
|