If you want to use a tolerance to allow for the decimal approximation
then use the abs function. for example suppose a:=sqrt(2) and
b:=1.4142 and you want to treat a and b being equal,
then the test will be abs(a-b)<0.0001 will return true
On Jan 26, 8:38 am, Travis Bower <
tbo...@dphs.org> wrote:
> Try searching the archives...approx or square root of 2 or etc.
> I asked a similar question awhile ago [root 2 worked and root 3 did not or
> something like that] Nelson provided insight about 14-place rounding etc.
> Maybe that will help.
>
>
>
> On Wed, Jan 25, 2012 at 1:31 PM, Reversearp <
abien...@gmail.com> wrote:
> > Yeah, no that works. I'm ok with that. It's the test that bothered me.
> > If 5*a returns -10 then I expected 5*a = -10 to return *true*.
> >
https://sites.google.com/site/tinspiregroup/classroom-news/welcome-ab...