Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7550583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:14:59+00:00 2026-05-30T10:14:59+00:00

I am storing a value (represented as a string originally) like this – 12345678901234.12345678912

  • 0

I am storing a value (represented as a string originally) like this – 12345678901234.12345678912 – in a double variable. After storing, it is represented in an exponential format (with an e). How do i convert this exponential representation to the original(string) representation?

Dim s as string = "1234567891234567.123456789"
Dim d as Double
Double.TryParse(s, d)
Console.WriteLine(d) 'Prints 1.23456789123457E+15

Using Decimal solves the problem but why cant Double do it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T10:15:00+00:00Added an answer on May 30, 2026 at 10:15 am

    Your string contains 25 significant digits. double simply doesn’t retain that amount of information. Even decimal can barely hold that much (28/29 digits). From the docs for System.Double:

    By default, a Double value contains 15 decimal digits of precision, although a maximum of 17 digits is maintained internally.

    You should read my articles on binary floating point and decimal floating point for more information – they come at the topic from a C# point of view, but you’re obviously using the same types from VB.

    In your particular case, the exact double value closest to 1234567891234567.123456789 is just 1234567891234567 – you’re losing all the information after the decimal point.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So, storing a Java String into a form hidden input value. I call said
I'm trying to convert a string value to Double but I sill get error
I have a String that represents a time value and is stored in the
Following is the script for matching regex and storing value in array: sub b1
I have a precision problem storing a float value in mysql via jpa (EclipseLink).
I have an iPhone app. I am storing a float value, (distance), in my
I'm having trouble storing and retrieving a float in NSUserDefauts. I store the value,
I'm displaying a page with a 4 textboxes, each storing the user entered value
I am looking for a lightweight, reliable and fast key/value database for storing binary
What am I doing wrong here? I'm serializing a value, storing it in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.