Solved

number accurency

Posted on 1998-11-09
3
507 Views
Last Modified: 2008-03-17
hi, how can i limit number accurency , for example i have floating point number  (LETS SAY dOUBLE TYPE)
and i want that the numbers will be just 3digit after the floating point
so number like this  2.234789753453e-16 will be consider as zero .
and from the oposite number like 4.456 will stay in his Current Value


0
Comment
Question by:asi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Expert Comment

by:zac
ID: 1346280
The easiest and most simple way is to use a mask edit if it is non DB data or to set the Displayformat and EditFormat of the field if it is a DB item.

The format you'll probably want is something like:

#.000

I hope this helps.

cheers,

Zac
0
 
LVL 5

Accepted Solution

by:
ronit051397 earned 10 total points
ID: 1346281
showmessage(FormatFloat('#,##0.###', 2.234789753453e-16));
0
 

Author Comment

by:asi
ID: 1346282
as always ... Ronit
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question