Significant Figures in Label Object

I want to have the value of number X written upto 100 significant figures in a label object or other text output object.

Label1.Caption:=FloatToStr(X);

The number has a lot of decimal places.

Comments

  • : I want to have the value of number X written upto 100 significant figures in a label object or other text output object.
    :
    : Label1.Caption:=FloatToStr(X);
    :
    : The number has a lot of decimal places.
    :
    :
    There is no point in using a FloatToStr() with 100 sign. decimals, because the largest Delphi floating point has only 20 sign. decimals. This means that the next 80 are not significant.
    If you truly need 100 sign. decimals, you need to develop specialized routines to be able to calculate with those numbers. This means you'll have to write your own addition, subtraction, multiplication, and division function to start with.
  • I thought "extended" type of real has a lot more decimal places than a 100.(about 4000) Am I wrong? Thank you for your respond
  • : I thought "extended" type of real has a lot more decimal places than a 100.(about 4000) Am I wrong? Thank you for your respond
    :
    The extended has 19-20 decimals (see the help files).
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories