|
-
May 28th, 2001, 07:02 PM
#1
Thread Starter
New Member
extra d.p. from vb?
is it at all possible to calculate numbers to n decimal places in vb, (as it seems to be limited to 14)?
thanks
grippa
-
May 28th, 2001, 07:39 PM
#2
Registered User
For increased precision look at the decimal data type.
-
May 29th, 2001, 11:07 AM
#3
Lively Member
I have a solution for C++.
-
May 29th, 2001, 11:57 AM
#4
Banned
Originally posted by TB
I have a solution for C++.
Which is?...
-
May 29th, 2001, 12:01 PM
#5
Lively Member
There is a class called FLINT, which can handle with long numbers (up to 1000 digits), I can send it to you.
If have the tutorial in a book, but i can send you a short version of it.
The class' contents are simple mathematial functions, like additon, comparison, square root..)
-
May 29th, 2001, 12:07 PM
#6
Banned
It's better to post it as an attachment in case of some one wants it too. Yes, I'm interested. I'm beginning in C and it would be a good exercise for me to see it.
-
Jun 10th, 2001, 06:34 PM
#7
Frenzied Member
Why Extra Precision.
Why do you want more precision than that provided by a VB Double? What is your application?
Programming extra precision arithmetic is tedious, but not difficult. You treat Longs as if they were digits in a long number, and use an Integer to kept track of the Radix point. Do not try to use Singles or Doubles as digits in a long number. The CPU normalization will create confusion.
With rare exceptions, more precision than a double is just not necessary.
In many cases, poor (or no) numerical analysis results in an apparent need for extra precision, when better computational algorithms are what is really required.
An example of the above type of problem is the evaluation of high order polynomials. Naive programmers often write a program which computes all the individual terms and then adds them up. The correct algorithm never explicitly calculates any of the individual terms.
There are chaotic physical problems which create fierce computational problems and seem to be solvable using extra precision arithmetic. Further analysis often indicates that any results obtainable via extra precision methods are unusable because the system being modeled by the math is inherently unstable or chaotic.
An example of the latter type of problem is flutter stability analysis in the aircraft design industry. Sometimes the air frame represented by the equations is inherently unstable. For such an airframe, a minor dent or a slight change in the arrangement of cargo can result in the aircraft being unflyable. The requirement for extra precision is actually an indication that you do not want to build the airframe, and should be making major design changes instead of attempting to get an accurate solution of the equations.
Live long & prosper.
The Dinosaur from prehistoric era prior to computers.
Eschew obfuscation!
If a billion people believe a foolish idea, it is still a foolish idea!
VB.net 2010 Express
64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|