[Maxima] unevaluated boolean and conditional expressions (take 1)
robert.dodier at gmail.com
Sat Jan 28 17:39:22 CST 2006
I've put together some code to equip Maxima to handle unevaluated
boolean and conditional expressions.
It's not finished, but I think it is well on its way.
When it is completed (maybe another month or so) I want to merge it
>From the comment header ---
; The functions in this file are an attempt to make Boolean (and, or, not)
; and conditional (if -- then -- else/elseif) expressions work more like
; arithmetic expressions in the treatment of predicates which are
; undecidable at the time the expression is evaluated,
; by allowing undecided predicates in simplified and evaluated
; expressions, instead of complaining or returning 'unknown.
assume (a > 1);
a > 1 and b < 0 => b < 0
c > 1 and b < 0 => c > 1 and b < 0
not b < 0 => b >= 0
if c then d => if c then d
plot2d (if x > 0 then x else -x, [x, -1, 1]) => nice plot
quad_qags (if x > 0 then x else -x, x, -1 ,1) => [1.0,
1.1107651257113993E-14, 63, 0]
More information about the Maxima