Solved

Converting Exponents to a Decimal, best practices.

Posted on 2012-03-19
3
228 Views
Last Modified: 2012-03-20
Hi please review my debug screen shot and advise on best practice to convert the exponent illustrated to a decimal in the proper format.  My code works on numbers without exponents but as seen in the illustration exponents are a item the conversion should be equipped to handle.

Thanks for the suggestions.
Debug.png
0
Comment
Question by:kapes13
3 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 37739577
Maybe I'm missing something, but the "exponent" you are seeing is just the way the debugger is displaying the data for the quick view. The X and Y values just below the quick view display as per your expectation.
0
 
LVL 29

Accepted Solution

by:
anarki_jimbel earned 500 total points
ID: 37739665
OK, there are no any exponents here!
Letter 'E' you see just denotes a power of 10, in your case '-14'.
In other words, the first number in IPoint.Position is :
-2.30926389122033 multiplied by 10 power (-14) = 10^-14
Really, 10^-14 = 0.00000000000001

If you multiply you have:
-0.0000000000000230926389122033

Really, this number is rounded (just to fit some predefined space).
Below we may see this number not rounded (or rounded with higher precision):
-0.000000000000023092638912203256
0
 

Author Closing Comment

by:kapes13
ID: 37741864
Thank you for the clarification.  I have found a way to handle them based on what you provided.  Cheers.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question