Alan Stebbens wrote:
> I probably don't understand intervals well enough yet, but if
>
> x = new interval[-2,2]
> [-2,2]
>
> and
>
> x^2
> [0, 4]
>
> then why doesn't abs[x] yield [0,2]?
>
> Further, why doesn't abs[x+2] => [0, 4]?
As of the current release, the behavior of the abs[x] function is
changed for interval arguments (real or complex arguments are not
changed.) It now does what you expected. It returns an interval,
including both endpoints and a "main/middle" value if one exists.
This is after some lengthy discussions with practitioners in the
field, so I think that what Frink is doing now is quite reasonable. The
behavior matches the spirit of abs[x] for real numbers, and allows more
programs to accept interval arguments and produce expected results
without modification.
There are more details in the "what's new" file:
http://futureboy.us/frinkdocs/whatsnew.html
Thanks to Alan Stebbens for bringing up this issue.
--
Alan Eliasen | "Furious activity is no substitute
eliasen@... | for understanding."
http://futureboy.us/ | --H.H. Williams