473,387 Members | 1,388 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Small Problem

I am looking for some help on this.

I am trying to translate to do some math in VB, but I have no idea how
this works out in VB syntax.

Points=1426.79/(1+918.836*Power(2.71828, -0.00386405*rating))

How would I do this in VB? I've tried a number of different ways, but
I just can't seem to get it right.

TIA,

Ryan
Jun 5 '07 #1
4 960
Ryan,

Try this:
Dim Points As Decimal = 1426.79 / (1 + 918.836 *
Math.Pow(2.71828, -0.00386405 * rating))

Math.Pow comes from the Microsoft.VisualBasic namespace. Also, I assumed a
decimal type, you might want to narrow that to a double, or whatnot
depending on the required precision.

Hope this helps,
Steve

"Yet Another One" <me@here.comwrote in message
news:d8********************************@4ax.com...
>I am looking for some help on this.

I am trying to translate to do some math in VB, but I have no idea how
this works out in VB syntax.

Points=1426.79/(1+918.836*Power(2.71828, -0.00386405*rating))

How would I do this in VB? I've tried a number of different ways, but
I just can't seem to get it right.

TIA,

Ryan

Jun 5 '07 #2
On Tue, 5 Jun 2007 13:16:17 -0400, "PlatinumBay"
<st*******@community.nospamstaggered into the room, obviously drunk,
and said:
>Ryan,

Try this:
Dim Points As Decimal = 1426.79 / (1 + 918.836 *
Math.Pow(2.71828, -0.00386405 * rating))

Math.Pow comes from the Microsoft.VisualBasic namespace. Also, I assumed a
decimal type, you might want to narrow that to a double, or whatnot
depending on the required precision.

Hope this helps,
Steve

"Yet Another One" <me@here.comwrote in message
news:d8********************************@4ax.com.. .
>>I am looking for some help on this.

I am trying to translate to do some math in VB, but I have no idea how
this works out in VB syntax.

Points=1426.79/(1+918.836*Power(2.71828, -0.00386405*rating))

How would I do this in VB? I've tried a number of different ways, but
I just can't seem to get it right.

TIA,

Ryan
Steve,

Thanks a TON! This helped a lot.

Much appreciated.

Ryan
Jun 5 '07 #3
It is worth noting that 2.71828 is just an approximation for e and therefore
the following is equivalent

Dim Points As Decimal = 1426.79 / (1 + 918.836 * Math.Exp(-0.00386405 *
rating))

"Yet Another One" wrote:
On Tue, 5 Jun 2007 13:16:17 -0400, "PlatinumBay"
<st*******@community.nospamstaggered into the room, obviously drunk,
and said:
Ryan,

Try this:
Dim Points As Decimal = 1426.79 / (1 + 918.836 *
Math.Pow(2.71828, -0.00386405 * rating))

Math.Pow comes from the Microsoft.VisualBasic namespace. Also, I assumed a
decimal type, you might want to narrow that to a double, or whatnot
depending on the required precision.

Hope this helps,
Steve

"Yet Another One" <me@here.comwrote in message
news:d8********************************@4ax.com...
>I am looking for some help on this.

I am trying to translate to do some math in VB, but I have no idea how
this works out in VB syntax.

Points=1426.79/(1+918.836*Power(2.71828, -0.00386405*rating))

How would I do this in VB? I've tried a number of different ways, but
I just can't seem to get it right.

TIA,

Ryan

Steve,

Thanks a TON! This helped a lot.

Much appreciated.

Ryan
Jun 6 '07 #4
On Wed, 6 Jun 2007 01:31:01 -0700, tony lock
<to******@discussions.microsoft.comstaggered into the room,
obviously drunk, and said:
>It is worth noting that 2.71828 is just an approximation for e and therefore
the following is equivalent

Dim Points As Decimal = 1426.79 / (1 + 918.836 * Math.Exp(-0.00386405 *
rating))
Thanks for noting that, I hadn't noticed.

Ryan
Jun 6 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Dave Brueck | last post by:
Below is some information I collected from a *small* project in which I wrote a Python version of a Java application. I share this info only as a data point (rather than trying to say this data...
2
by: Marek Malowidzki | last post by:
Hi all, I am writing a component that exposes a C++ library as a .NET component. The approach is somewhat automatic: every library C++ class has its managed C++ counterpart that keeps a pointer...
11
by: Bo Peng | last post by:
Dear List, It is not clear what the title means. :-) Here is the details: I need to manage a big bunch of small objects, like struct{ int a; int b; }obj;
0
by: Tony Lugg | last post by:
I have an application with a document management form. When users add documents to the form, I call the API function SHGetFileInfo to get the associated large and small icons for the file. These...
3
by: Tony Lugg | last post by:
I have an application with a document management form. When users add documents to the form, I call the API function SHGetFileInfo to get the associated large and small icons for the file. These...
2
by: Luc | last post by:
I saw a few posts on this newsgroup about it but nothing to help me resolve this problem: We designed a window in .NET on a platform using small fonts (120 ppp). But this window will run on...
4
by: =?Utf-8?B?VzFsZDBuZTc0?= | last post by:
When one architects a new project one of the first steps in the decision is to decide on the layers. (In my opinion anyway) One architecture that I have used before is to go solid OO and create...
12
by: elty123 | last post by:
I have a small C# program (about 400 lines of code) that is only 28kb after compiled. However when it runs (takes a whole 5 seconds) it takes up nearly 20MB of memory and I don't see why. ...
169
by: JohnQ | last post by:
(The "C++ Grammer" thread in comp.lang.c++.moderated prompted this post). It would be more than a little bit nice if C++ was much "cleaner" (less complex) so that it wasn't a major world wide...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.