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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:30:32+00:00 2026-05-24T23:30:32+00:00

Many programming languages that use IEEE 754 doubles provide a library function to convert

  • 0

Many programming languages that use IEEE 754 doubles provide a library function to convert those doubles to strings. For example, C has sprintf, C++ has stringstream, Java has Double.toString, etc.

Internally, how are these functions implemented? That is, what algorithm(s) are they using to convert the double into a string representation, given that they are often subject to programmer-chosen precision limitations?

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-24T23:30:33+00:00Added an answer on May 24, 2026 at 11:30 pm

    The code used by various software environments to convert floating-point numbers to string representations is typically based on the following publications (the work by Steele and White is particularly frequently cited):

    Jerome T. Coonen: “An Implementation Guide to a Proposed Standard for Floating-Point Arithmetic.” Computer, Vol. 13, No. 1, January 1980, pp. 68-79

    Guy. L. Steele Jr. and J. L. White: “How to print floating-point numbers accurately”. In proceedings of ACM SIGPLAN ’90 Conference on Programming Language Design and Implementation, White Plains, New York, June 1990, pp. 112-126

    David M. Gay: “Correctly rounded binary-decimal and decimal-binary conversions.” Technical Report 90-10, AT&T Bell Laboratories, November 1990.

    Some relevant followup work:

    Robert G. Burger and R. Kent Dybvig: “Printing floating-point numbers quickly and accurately.” In proceedings of ACM SIGPLAN 1996 conference on Programming Language Design and Implementation, Philadelphia, PA, USA, May 1996, pp. 108-116

    Guy L. Steele Jr. and Jon L. White: “Retrospective: How to print floating-point numbers accurately.” ACM SIGPLAN Notices, Vol. 39, No. 4, April 2004, pp. 372–389

    Florian Loitsch: “Printing floating-point numbers quickly and accurately with integers.” In proceedings of 2010 ACM SIGPLAN Conference on Programming Language Design and Implementation, Toronto, ON, Canada, June 2010, pp. 233-243

    Marc Andrysco, Ranjit Jhala, and Sorin Lerner: “Printing floating-point numbers: a faster, always correct method.” ACM SIGPLAN Notices, Vol. 51, No. 1, January 2016, pp. 555-567

    Ulf Adams: “Ryū: fast float-to-string conversion.” ACM SIGPLAN Notices, Vol. 53, No. 4, April 2018, pp. 270-282

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

Sidebar

Related Questions

Many programming languages share generic and even fairly universal features. For example, if you
Hey everyone, in many programming languages there is this great idiom that lets you
What resources are available that use benchmarks for comparing programming languages? I am interested
What are all the computer languages that exist, and how many people use them?
This should be very simple question. There are many programming languages out there, compiled
In Ruby, like in many other OO programming languages, operators are overloadable. However, only
There is so many option in each programming languages which can be mentioned in
Of late, I've been hearing many good things about functional programming languages such as
I've been programming in C,C++,C# and a few other languages for many years, mainly
This RFC mentions Unlike many programming languages Perl does not currently implement true multiline

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.