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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:29:46+00:00 2026-05-13T09:29:46+00:00

I am using F# Interactive, and I have added the reference of FSharp.PowerPack.dll. When

  • 0

I am using F# Interactive, and I have added the reference of FSharp.PowerPack.dll.

When I try to convert BigNum to double as the following code,

let n = 2N
let d = double n

error comes out that

“System.MissingMethodException: Method not found: ‘Double System.Numerics.BigInteger.ToDouble(System.Numerics.BigInteger)’. at Microsoft.FSharp.Math.BigNum.ToDouble(BigNum n)”

What can I do if I want to make such conversions like “BigNum to int” and “BigNum to double”? Thanks very much.

  • 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-13T09:29:47+00:00Added an answer on May 13, 2026 at 9:29 am

    What you’ve written will work in the F# standalone CTP.

    This error occurs in VS2010, because the BigInteger type has been moved from the F# library to the .Net4.0 core library. I’m not sure whether this issue has something to do with having both the F# CTP and the VS2010 beta installed.

    Until a better solution comes along, you could roll your own conversion like this:

    let numToDouble (n:bignum) = double n.Numerator / double n.Denominator

    To convert a bignum to an integer you could then think of something like this:

    let numToInt (n:bignum) = int n.Numerator / int n.Denominator

    But this is rather dangerous: it’ll overflow quite easily. A better version of numToInt would be to convert to a double first and then convert to int:

    let numToInt = int << numToDouble

    Still, both conversions aren’t ideal for numerators/denominators of more than 308 digits, which will still overflow a double, while the fraction itself could be small.

    ex: 11^300 / 13^280 ~= 3.26337, but

    > numToDouble (pown 11N 300 / pown 13N 280);;
    val it : float = nan
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code to run python and get the result in scratch
When using PyWin I can easily load a python file into a fresh interactive
Using online interfaces to a version control system is a nice way to have
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
Currently am using an interactive flash map on my website, which displays different colors
I am building a website using php+mysql. I have a registration page and its
I have a function to compress my pdf file using pdftk: (defun compresspdf (filename)
I am interacting with an Oracle DB using SQL over an ODBC connection. Is
I am interacting with a web server using a desktop client program in C#
We're creating a Interaction design pattern website for a class. We've been using google

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.