VBScript - No Real Math?? FORGET MICROSOFT??? Go Java??

This is real frustrating.

In JavaScript I Use:

Myvar = Math.pow(.005, 2)

I get .000025

If I use in VBScript

.005^2

I get some long number with an E factor.

I'm trying to calculate Loan payments. The Javascript comes up with the same

thing as my Real Estate calculator. VBScript is out to lunch. It overshot

the payment ($160000 at 6% for 30 years) by over a hundred dollars.

The calculation in Java is:

MonthPayment=Math.floor((Prin*MonthRate)/(1-Math.pow((1+MonthRate),(-1*NumPa

yments)))*100)/100

It works.

In VBScript I used

Int((Prin*MonthRate)/(1-((1+MonthRate)^(-1*NumPayments)))*100)/100

It got just a hair closer if I used CDbl(MonthRate) first. I tried dropping

the Int, making it a double, etc. etc., etc. That's garbage, it's already a

variant. It still didn't get it right. Infact it changed the number very

little (but some).

The results aren't even close to the same. As shown above, I nailed it down

to apparantly VB can't really do powers in any detail. Garbage.

If I'm right, I'm going to study Java & C++ (Borland) much harder, forget

about Microsoft Certification and basically try to get away from Microsoft

completely. I've put years into VB. If it can't do math, I don't have any

more use for it and that would be downright disgusting.

So, MS gurus, can you help me? Can VB do real math? Or do I rewrite this

whole application in JavaScript and go with a competitor's Internet Server?

--

Marl Atkins

Microsoft Certified Professional

SoftLink Systems

www.softlinksys.com