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

  • Home
  • SEARCH
  • 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 8098155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:59:27+00:00 2026-06-05T21:59:27+00:00

In C#, there is a type called decimal (the System.Decimal structure). I have found

  • 0

In C#, there is a type called decimal (the System.Decimal structure). I have found information that shows how it is better than float and double types for some cases:

  • StackOverflow – double-precision-problems-on-net
  • StackOverflow – how-to-make-doubles-work-properly-c-sharp

Is there any similar type for Borland C++ Builder programs?

  • 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-05T21:59:28+00:00Added an answer on June 5, 2026 at 9:59 pm

    The decimal type in C#, .NET’s System.Decimal type, is just a floating point number stored as base-10 instead of base-2 encoding. float and double are more typical base-2 floating point numbers. That is, a double is stored as +/- x * 2^y while a decimal is stored as +/- x * 10 ^ y. That’s why it does better for, as one example, financial data, which is typically expressed in terms of x * 10^-2. The IEEE standard 754 (the floating point math standard) calls this “decimal floating point” math, and defines a 32- and 64-bit version of each.

    In C++, these types are implemented in the std::decimal namespace, and are called std::decimal::decimal32 and std::decimal::decimal64, in the <decimal> header. If Borland C++ builder has such a type, you will find it there. GNU’s C++ library includes this header but, AFAIK it’s not actually part of the standard yet, so BCB may not have it. If that’s the case, you’ll need to use a third-party library. @dash’s example of Intel’s Decimal Floating Point library is probably the best known such library, though a Google search for IEEE 754 Decimal should turn up others if, for some reason, you need them.

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

Sidebar

Related Questions

Are there any standalone type conversion libraries? I have a data storage system that
say I have an assembly call B, inside B, there is a type called
I currently have an immutable type called Gene , that only has 2 fields:
There is an entity type called Product that is generated by entity framework. I
I know that there is a data type called NSTimeInterval , but this is
I have a domain collection type called SavedAnswers and would like to add that
In MyApp-Info.plist, there is an entry called Icon files, it is type of an
Is there a data type in eVC++ that is the equivalent of __int64 ?
There's a field with type of varchar. It actually stores a float point string.
Is there a type called rect in C or class Rect in C++ language.

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.