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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:04:03+00:00 2026-06-09T01:04:03+00:00

Using the DEFAULT FloatToStr function FloatToStr(‘0.0000442615029219009’) outputs 4.42615029219009E-5 dropping one zero after the decimal

  • 0

Using the DEFAULT FloatToStr function

FloatToStr('0.0000442615029219009')

outputs

4.42615029219009E-5

dropping one zero after the decimal place

FloatToStr('0.000442615029219009')

produces

0.000442615029219009

Can someone please explain why the value in the second case is not output to

4.42615029219009E-4
  • 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-09T01:04:05+00:00Added an answer on June 9, 2026 at 1:04 am

    The documentation for FloatToStr contains the answer:

    The conversion uses general number format with 15 significant digits.

    To interpret that statement you need also to refer to the topic describing the Format function, and specifically the text concerning the general number format (emphasis mine):

    The value is converted to the shortest possible decimal string using fixed or scientific format. The number of significant digits in the resulting string is given by the precision specifier in the format string; a default precision of 15 is assumed if no precision specifier is present. Trailing zeros are removed from the resulting string, and a decimal point appears only if necessary. The resulting string uses the fixed-point format if the number of digits to the left of the decimal point in the value is less than or equal to the specified precision, and if the value is greater than or equal to 0.00001. Otherwise the resulting string uses scientific format.

    Unfortunately the documentation is in fact in error there. Instead of 0.00001 it should read 0.0001. That this is illustrated by this program:

    program FloatToStrScientificFixed;
    {$APPTYPE CONSOLE}
    uses
      System.SysUtils;
    
    var
      d: Double;
    
    begin
      d := 0.0001;
      Writeln(FloatToStr(d*0.9999999));
      Writeln(FloatToStr(d));
      Writeln(FloatToStr(d*1.0000001));
      Readln;
    end.
    

    For your examples, 0.0000442615029219009 is less than 0.0001 and so is formatted using scientific notation. But 0.000442615029219009 is greater than 0.0001 and so gets formatted using fixed notation.

    If you want your output always to use scientific notation then use Format with the e format string.


    QC#107388

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

Sidebar

Related Questions

I am using default PHP mail() function to send emails as below . I
I inserted a splash screen using default.png - set to one of the pictures
I'm provided a library with a builder function using default/named params. Something like def
I have webserver using default virtualhost apache <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www <Directory
using the default route routes.MapRoute( Admin, // Route name Admin/{action}, // URL with parameters
Even using the default test code on my app I can't get this working.
im using a Default.png file for my iPad-app. It appears correctly but i could'nt
I'm using the default Virtuemart product search module. If I search for something, I'm
I am using python default development http server, and it works fine. Error ,The
I am using their default POS tagging and default tokenization..and it seems sufficient. I'd

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.