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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:56:19+00:00 2026-05-26T09:56:19+00:00

Is it possible to get more than 100 decimal digits in C#? If yes

  • 0

Is it possible to get more than 100 decimal digits in C#?

If yes what is the necessary portion of code?

In Java there something call BigDecimal but it still can’t reach more than 55 digits.

  • 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-26T09:56:19+00:00Added an answer on May 26, 2026 at 9:56 am

    Using J# libraries:

    Download the J# Redistributable to obtain the J# class libraries. This article hints about how to use it to get ZIP-ability in your .NET projects, and explains a bit about BigDecimal, but as Ramhound explained, the article is relatively old.

    After download, add the vsjlib to your project. It didn’t work for me on .NET 4.0, but it did work on 2.0 project. It contains a BigDecimal class, among others. Not sure, however, if that gives you up to 100 decimals, but you might give it a try.

    Using MPIR — Multi Precision Integers and Rationals

    You can download a wrapper for the MPIR library for .NET here (download version 0.2). Then, do the following:

    • Add the the files \wrapper.*.dll to your project, make sure that on each built they are copied to your Debug or Release directory.
    • Add \wrapper\xmpir.cs to your project
    • Add the following code to your project:

      // set the precision to 512 bits (adjust this to your needs)
      mpir.mpf_set_default_prec(512);
      ulong default_prc = mpir.mpf_get_default_prec();
      
      // init vars (important!)
      mpir.mpf_t val = mpir.mpf_init_set_d(.5);
      mpir.mpf_t result = mpir.mpf_init_set_ui(0);
      
      // calculate 0.5^200
      mpir.mpf_pow_ui(result, val, 200);
      double dresult = mpir.mpf_get_d(result);
      
      // convert result to a string, in the form 1.2345 (dot not in output) and exp holding exponent
      long exp;
      string sresult = mpir.mpf_get_string(out exp, 10, 0, result);
      
      // free vars (important!)
      mpir.mpf_clear(val);
      mpir.mpf_clear(result);
      

    Note that the variable sresult will only hold the significant digits. You’ll have to add the logic for printing the exponent as well, or a bunch of zeroes.

    Result is 6.2230152778611417071440640537801242405902521687211671331011166147896988340353834411839448231257136169569665895551224821247160434722900390625E-60

    A documentation PDF file on the full MPIR library shows how to use it in more detail.

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

Sidebar

Related Questions

Is it possible to get more than one balloon on map in android application?How
Is it possible to get Core Data cascade delete to delete objects more than
Is there a way to get more than the 2 lines for the Alert
Is it possible to get more than 9 subplots in matplotlib? I am on
Possible Duplicate: Get URL of ASP.Net Page in code-behind I'm trying to hold current
here is the WSDL http://www.webservicex.net/stockquote.asmx?WSDL I'm trying to get more than 1 stock in
i'm trying to get more info in the nimbuzz protocol, and possibly find any
does anyone know how to (if possible) get the owner of the tag on
I am trying to work out if it is possible get JPA to persist
Possible Duplicate: Get all files from VSS for a given date? I need to

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.