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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:34:28+00:00 2026-05-24T10:34:28+00:00

I will be working for a company where they are programming for Financial Institutions

  • 0

I will be working for a company where they are programming for Financial Institutions and I will be working with money a lot. Before that it wasn’t a major concern for me because I’ve been doing small money things and Double was enough at some point but now even 1 penny is darn important.

I think everyone may know the

Dim mValue as Decimal = 100 'seems the best type for now
mValue = mValue / 3
Console.WriteLine(mValue)
Console.ReadLine()

mValue = mValue * 3
Console.WriteLine(mValue)
'Outputs 99.9999999999999999999999999... and never hits 100

So how can I get over this problem and find even better precise results?

Thanks.

  • 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-24T10:34:28+00:00Added an answer on May 24, 2026 at 10:34 am

    I’m not an expert in this field so someone with more experience might answer this better.

    You can pretty safely round to 10000 digets or so, and then round to the nearest penny when you want to use the number. This works for the example you posted

    100/ 3 = 33.333333333333333 * 3 = 99.99999999999 which is then rounded to 100.

    I know that many things use whats called bankers’ rounding. This is to prevent losing money when something ends with exactly 5. It rounds up if the number before the 5 is odd, and it rounds down if the number is even. Something to consider.

    http://en.wikipedia.org/wiki/Rounding

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

Sidebar

Related Questions

I'm working on a web app for my company that will let us do
I'm working on a site that will go on my company's intranet. I developed
i will be working on a project that tries to determine your position using
I have a small project that I will be working on shortly that collects
I´m working on a project that basically will show some data collected from hardware
I'm working on a website that will switch to a new style on a
I'm working for a company that has already released an app on the store.
The company that I'm working is working with SVN but I would like to
I'm working to create a simple Python script that will ultimately tell you how
I've been working on a web application for a company that assists them with

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.