View Single Post
Rob Channell Rob Channell is offline
Registered
 
Rob Channell's Avatar
 
Join Date: Feb 2004
Location: Decatur/Madison, Alabama
Posts: 1,192
The 32 bit Microsoft Visual Studio compilers can do floats or doubles right out of the box. Floats are 32 bit and the doubles are 64 bit. 64 bit seems to be enough precision for most calculations. The max value for a 32 bit float is 3.4*10e38 and the max value for a double is 1.7*10e308. How big of a number do you need?

Other libraries are geared toward very large numbers such as used in computing pi to 1 billion digits or prime number searches, etc. I think some of these libraries are referred to as arbitrary precision libraries because you can choose how many digits of precision the library will provide. It all costs in terms of memory and speed.

If you are currently using float type variables in the C/C++ code then try changing them to a double and see if you get the response you would like. don't forget to take into account the change in size of any data structures using these types. It can mess you up with pointers and such depending on how the current code is written to access the data structures.
__________________
Rob Channell
One Way Motorsports
1979 911SC mostly stock
1972 911T Targa now with a good 2.7
1990 Miata (cheap 'n easy)
1993 C1500 Silverado (parts getter)
Old 10-13-2010, 07:37 PM
  Pelican Parts Catalog | Tech Articles | Promos & Specials    Reply With Quote #3 (permalink)