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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:39:40+00:00 2026-05-24T17:39:40+00:00

A while ago I wrote a program which used some factorial functions. I used

  • 0

A while ago I wrote a program which used some factorial functions. I used the long double data type to support “relative” big numbers.

Now, I changed from codeblocks to Visualstudio 2010, I was wondering why my program didn’t work any more till I realized after some research that MS has abandonded the long double data type.
Is there any special reason for this? To me it looks very like step backwards in terms of technology.

Is there any alternative to use? (I would also be happy with an alternative out of the boost library).

  • 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-24T17:39:41+00:00Added an answer on May 24, 2026 at 5:39 pm

    I’m not sure why you think that long double was “abandoned”, as it is part of the C++ Standard and therefore a compliant implementation must, well, implement it.

    What they did “abandon” is long double overloads of mathematical functions, and they did this because:

    In Win32 programming, however, the long double data type maps to the double, 64-bit precision data type.

    which, in turn, along with long double in older VS versions being 80-bit, is because:

    FP code generation has been switching to the use of SSE/SSE2/SSE3 instruction sets instead of the x87 FP stack since that is what both the AMD and Intel recent and future chip generations are focusing their performance efforts on. These instruction sets only support 32 and 64 bit FP formats.

    Still, that they chose not to support these overloads, even with same-sized double and long double types (both could have been made 64-bit), is a shame because they are also part of the C++ Standard. But, well, that’s Microsoft for you. Intently stubborn.

    [n3290: 26.8]: In addition to the double versions of the math
    functions in <cmath>, C++ adds float and long double overloaded
    versions of these functions, with the same semantics.

    However, although these overloads are essentially deprecated in Visual Studio, they are still available, so you should still be able to use them:

    The Microsoft run-time library provides long double versions of the
    math functions only for backward compatibility.


    Is there any alternative to use? (I would also be happy with an alternative out of the boost library).

    It sounds to me like you have been relying on long double to support a specific range of numeric values, and have consequently run into regression issues when that has changed in a different toolchain.

    If you have a specific numeric range requirement, use fixed-range integral types. Here you have a few options:

    • stdint.h – a C99 feature that some C++ toolchains support as an extension;
    • stdint.h – a C99 feature that Boost re-implements as a library;
    • cstdint – a C++0x feature that may be of use if you are writing C++0x code.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A while ago, I wrote a program that outputs any localhost or network database
I wrote a perl script a while ago which logged into my online banking
A while ago, I came across some code that marked a data member of
I wrote a program about 10 years ago in Visual Basic 6 which was
I wrote a program some time ago (Mac OS X, C++, SDL, FMOD) and
A (long) while ago I wrote a web-spider that I multithreaded to enable concurrent
A while ago, I wrote some Word interop examples in Visual Studio beta 1,
I have the following php function which i wrote a while ago. Now however,
I'm going over some SQL I wrote a while ago that joins 4 tables
A while ago I wrote a plan management system for the council that I

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.