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 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
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
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
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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;
|
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...
|
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...
|
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...
|
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...
|
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.
...
|
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...
|
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,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
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...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
| |