the smallest epsilon for reliable inequality calculation
Subject: the smallest epsilon for reliable inequality calculation
From: Steve Haflich
Date: Mon, 25 Jun 2012 04:53:36 -0700
Ed Romana <erom at earthlink.net> wrote:
Given a real number, is there a Maxima function that returns the
smallest epsilon for reliable inequality determination.
Did you mean to ask about "float" rather than "real"? Ratios are real
numbers and support extreme precision.
cl-user(22): (typep 100000000000000000000000000000000000000000000000000/100000000000000000000000000000000000000000000000001
'real)
t
cl-user(23): (< 100000000000000000000000000000000000000000000000000/100000000000000000000000000000000000000000000000001
1)
t
cl-user(24): (< 100000000000000000000000000000000000000000000000000/99999999999999999999999999999999999999999999999999
1)
nil
cl-user(25): (< 1
100000000000000000000000000000000000000000000000000/100000000000000000000000000000000000000000000000001)
nil
With regard to floats or various precisions, I'm unfamiliar what support
Maxima itself might provide. The underlying Common Lisp has a panoply
of constants such as least-positive-single-float,
least-positive-single-float, single-float-epsilon,
single-float-negative-epsilon etc., but computations using these
constants are treacherous. Also, IEEE and many implementations support
unnormalized floats, so consider also
least-positive-normalized-single-float, etc.