On 08/04/2009 01:48 AM, Alan Eliasen wrote:
> On 08/04/2009 01:15 AM, Alan Eliasen wrote:
>> Please note again that there have been changes in the 2009-07-19
>> release of Frink that affect this behavior. Since this update, some
>> expressions (notably x/x and sometimes x-x) will be symbolically
>> simplified, which may change your results and give you tighter bounds.
>> Note that the programmer is still always encouraged to pre-simplify
>> symbolic expressions when it makes sense.
>
> When thinking about this issue, I noticed that x-x can be simplified
> a bit more aggressively than it was before; the current (2009-08-04)
> release of Frink has this simplification. Thanks for the comments and
> questions!
This change turned out to be overly aggressive, and the changes were
removed. If you downloaded Frink earlier today, I'd recommend getting
the current version.
===========================
Technical Explanation: Many normal algebraic simplifications
*cannot* be performed on many of the data types used in Frink. For example:
* Intervals are not distributive. That is a(b+c) does not
necessarily equal (ab + ac)!
* If you want to preserve and check units of measure through all
calculations, you *cannot* perform some mathematical simplifications like
0 * x = 0
or
x + 0 = x
As these transformations will lose information about the units of
measure that may someday be contained in the variable x, or cause units
with different units of measure to be added to each other.
* Date/Time math cannot use some of these transformations. For
example, when subtracting dates, one normally obtains the duration
between those dates (say, in seconds.) However, if doing a
transformation like:
x - x = 0
the result comes out dimensionless, and *not* a duration. (This
case caused obvious errors in the change I checked in last night.)
--
Alan Eliasen
eliasen@...
http://futureboy.us/