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 7873613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:34:10+00:00 2026-06-03T02:34:10+00:00

I have a double value I want to convert it to an integer value.

  • 0

I have a double value I want to convert it to an integer value. However, the double value is large enough so that it causes problems. Here is an example:

double val1 = 74.1234567890
int val2;

I want the value of val2 to be equal to 741234567890 that is without decimal point. Does anyone have any suggestions on how to accomplish this?

  • 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-06-03T02:34:11+00:00Added an answer on June 3, 2026 at 2:34 am

    And what do you want from 74.1234560000. If it’s always 10 digits, val * 1e10, then conversion to a suitably large integral type, does the job. Otherwise, you’ll have to define more clearly what you want. If it is based on the string used to initialize the double, there it can’t be done; many different strings can result in exactly the same internal value, including strings that would represent different values if interpreted as a real. At the other extreme, if you want the smallest integer value such that the value, multiplied by some negative power of 10, is exactly the value of the float… most floating point values will require something like 52 decimal digits, and the results almost certainly won’t fit on any native integral type.

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

Sidebar

Related Questions

I have a string value that could contain a double, integer, ascii or byte
I have a string containing 0xAp-2. I want to convert that to a double
I have a string like 1.5% and want to convert it to double value.
I have a Double value xx.yyy and I want to convert to string xxyyy
I want to convert double precision numbers to decimal . for example I have
I have some double values I want to convert to a string with this
Need some help with DataFormatString in GridView. I have a Double value that needs
I have the following code that takes a double value and converts it to
I have a double converted to a unsigned char array. For example for value
I have a latitude and longitude values as a double value(37.33168900, -122.03073100). I want

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.